VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Make Get-VirtualPortgroup use it's parameters in a conventional way

When you provide the VMHost and VirtualSwitch parameters on a call to Get-VirtualPortgroup, the cmdlet will return:

  • all portgroups on the switch passed on the VirtualSwitch parameter


  • all portgroups (VSS and VDS) on the ESXi node passed on the VMHost parameter


It looks as if both parameters are or-ed together, while the normal behaviour on PowerShell/PowerCLI cmdlets is to "and" parameters together.

Take for example the Get-Annotation cmdlet, where the Entity and CustomAttribute parameters are and-ed together.

  • Luc Dekens
  • Sep 26 2017
  • Looking for Feedback
  • Attach files