Automation

 View Only
  • 1.  Static MAC via PowerCLI

    Posted Aug 21, 2018 05:18 AM

    I looking for PowerCLI command setting ethernetX.checkMACAddress = "false" (eg. ethernet0.checkMACAddress = "false") for allowing to use any MAC address.

    I'm able to set static MAC, but I don't know how to set checkMACAddress = "false" setting

    $VM = Get-VM test

    $myNetworkAdapters = Get-NetworkAdapter -Name "Network adapter 1" -VM $VM

    Set-NetworkAdapter -NetworkAdapter $myNetworkAdapters -MacAddress "00:50:56:01:02:03"



  • 2.  RE: Static MAC via PowerCLI
    Best Answer

    Posted Aug 21, 2018 05:29 AM

    Try like this

    $vm = Get-VM "MyVM"

    New-AdvancedSetting -Entity $vm -Name ethernet0.checkMACAddress  -Value false -Force -Confirm:$false

    If you have more than 1 vNIC on a VM, you'll have to make sure you have the correct number in the Name