Recently my script stopped working to connect to vCloudDirector. I consume vCloudDirector from a managed service company and sometimes the version changes without me knowing or having a simple way to check it. Just now this happened to me again, usually this then means my PowerCLI script starts failing.
Connect-CIServer : 30.04.2025 10:17:40 Connect-CIServer NOT_ACCEPTABLE: The request has invalid accept header: Invalid API version requested. Supported API versions are: [38.0.0-alpha, 37.3, 37.2, 37.1, 37.0, 36.3,
36.2, 36.1, 36.0, 35.2 [D], 35.0 [D], 34.0 [D], 33.0 [D]] ([D] indicates deprecated versions)
At line:25 char:1
+ Connect-CIServer -Server ("https://{0}" -f $vcd) -SessionId “Bearer $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-CIServer], CIServerException
+ FullyQualifiedErrorId : Cloud_ConnectivityServiceImpl_ConnectCloudServer_BySessionId_ConnectError,VMware.VimAutomation.Cloud.Commands.Cmdlets.ConnectCIServer