VMware Cloud Community
christophherde1
Contributor
Contributor

Rename Portgroup

Hi there!

I'm renaming the installer created portgroup "Management Network" using this:

Get-VMhost -Name $InstallIP | Get-VirtualPortGroup -Name 'Management Network' | Set-VirtualPortGroup -Name $managementpgname

PowerCLI shows me the deprecation warning "WARNUNG: The 'VMHostId' property of VirtualPortGroup type is deprecated. Access the host id through the VirtualSwitch property instead (e.g. 'VirtualSwitch.VMHostId')."

Could somebody please advise me how to replace the above code?

 

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

That is just a warning that has been there for quite some time, I don't see an immediate reason to change anything in your code.


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