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"
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
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
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
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference