VMware Cloud Community
RichardBrown
Contributor
Contributor
Jump to solution

Powershell how to set management VLAN ESXi 6.7

Anyone know how to set the management VLAN for vmk0 using powershell

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Afaik that is not done on the VMKernel but on the portgroup to which the VMKernel belongs.

Something like this

$esx = Get-VMHost -Name MyEsx

$vmk = Get-VMHostNetworkAdapter -VMHost $esx -Name vmk0

Get-VirtualPortGroup -Name $vmk.PortGroupName -VMHost $esx |

Set-VirtualPortGroup -VLanId 0 -Confirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

Afaik that is not done on the VMKernel but on the portgroup to which the VMKernel belongs.

Something like this

$esx = Get-VMHost -Name MyEsx

$vmk = Get-VMHostNetworkAdapter -VMHost $esx -Name vmk0

Get-VirtualPortGroup -Name $vmk.PortGroupName -VMHost $esx |

Set-VirtualPortGroup -VLanId 0 -Confirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos