VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Remove (or document) inconsistencies with the Server parameter

The Server parameter that is present on multiple cmdlets, has imho some inconsistencies.

For example:

- connect to 2 vCenters (VC1 and VC2)

- get an ESXi node object from VC1 ($esx = Get-VMHost -Server VC1 | Select -First 1)

- now Get-VIPermission -Entity $esx -Server VC2 will work correctly, but should it ?

It looks like the Server parameter is not taken into account when an object for Entity is provided.


One could argue that the Server parameter should have it's own proper ParameterSet, but then the functioning of OBN seems to get in trouble.

Because

Get-VIPermission -Entity $esx.Name -Server VC2 will fail (as it should)

and

Get-VIPermission -Entity $esx.Name -Server VC1 works (as it should)

 

This behaviour of the Server parameter can be found in many other PowerCLI cmdlets.

  • Luc Dekens
  • Nov 2 2017
  • Attach files