VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Add an API parameter on the Connect-VIServer cmdlet

The current Connect-VIServer cmdlet by default connects to a vSphere server with the highest available API version.

For testing and validation purposes (in environments with mixed API versions present), it would be useful to be able to specify the desired API version when connecting.
This would for example allow testing against API 6.0 in an API 6.5 environment.

And this would probably allow us to bypass the Get-VIEvent issue with the internal HostSubSpecificationUpdateEvent, which generates the infamous "Error in deserializing body of reply message...", by switching to API 6.0 for event reporting.

  • Luc Dekens
  • Apr 12 2018
  • Will not implement
  • Attach files
  • Admin
    Jake Robinson commented
    20 Apr 09:22

    vSphere APIs are designed to be backward compatible. Anything not backward compatible is a bug that should be reported.

  • Luc Dekens commented
    20 Apr 11:22

    I agree that this would indeed void the idea, at least the "bug" part of the justification, in an ideal world.

    Besides the bug part, implementation of the idea would also allow testing scripts for backward compatibility.
    Development is not always done in all supported versions, and having an API parameter would be an ideal option for automatic testing, with for example Pester.