Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 249166

Re: Change PortGroup for Existing VMK Port on dVs

$
0
0

What you can do is remove the port group then re-add it with the new pg name.

 

 

$adapters = Get-VMHost | Get-VMHostNetworkAdapter | ? {$_.portgroupname -match "FAB"}


foreach ($adapter in $adapters) {
    Remove-VMHostNetworkAdapter $adapter -Confirm:$false    if ($adapter.portgroupname -match "Fab-A")         {New-VMHostNetworkAdapter -VMHost $adapter.vmhost -IP $adapter.IP -SubnetMask $adapter.subnetmask -PortGroup $newnfspga -VirtualSwitch $dvs}    if ($adapter.portgroupname -match "Fab-B")         {New-VMHostNetworkAdapter -VMHost $adapter.vmhost -IP $adapter.IP -SubnetMask $adapter.subnetmask -PortGroup $newnfspgb -VirtualSwitch $dvs}
}

Viewing all articles
Browse latest Browse all 249166

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>