Automation

 View Only
  • 1.  Rename Portgroup

    Posted Jul 08, 2021 02:23 PM

    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?

     



  • 2.  RE: Rename Portgroup

    Posted Jul 08, 2021 02:28 PM

    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.