LucD
Leadership
Leadership

How did you change the portgroupname ?

With PowerCLI

Get-VMHost <esx-name> | Get-VirtualPortGroup -Name <current-pg-name> | Set-VirtualPortGroup -Name <new-pg-name>

or did you use the UpdatePortGroup method ?

$oldName = <current-pg-name>
$newName = <new-pg-name>
$esx = Get-VMHost <esx-name> | Get-View
$netSys = Get-View $esx.ConfigManager.NetworkSystem
$pg = $esx.Config.Network.Portgroup | where {$_.Spec.Name -eq $oldName}
$spec = $pg.Spec
$spec.Name = $newName
$netSys.UpdatePortGroup($oldName, $spec)

____________

Blog: LucD notes

Twitter: lucd22


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

Reply
0 Kudos