VMware Cloud Community
jdruzd6
Contributor
Contributor
Jump to solution

Static MAC via PowerCLI

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"

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos