PowerCLI not connecting to vCenter in another domain

I came across an odd issue the other day where my PowerCli session would not authenticate to a vCenter in another domain within the forest, although I could get to the one on my local domain. Here’s the error I was getting:

[Connect-viserver vcsa02.deathstar.local
Connect-viserver : 13/10/2017 10:17:35 AM Connect-VIServer Could not resolve the requested VC server.
Additional Information: There was no endpoint listening at https://vcsa02.deathstar.local/sdk that could accept the
message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
At line:1 char:1
+ Connect-viserver vcsa02.deathstar.local
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Connect-VIServer], ViServerConnectionException
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_NameResolutionFailure,VMware.VimAutomation.ViCo
re.Cmdlets.Commands.ConnectVIServer

Some head banging ensued after ruling out the regular DNS and vCenter service functionality, I soon realised that I could connect via another workstation so I knew it was something with the workstation PowerShell instance.

Turns out, I forgot that the day before I was playing with the powershell proxy settings so that I could get out to the interwebz and update to the latest PowerCLI release.

Get-PowerCLIConfiguration returned ‘UseSystemProxy’:

[10:55:38]# get-powercliconfiguration

Scope ProxyPolicy DefaultVIServerMode InvalidCertificateAction DisplayDeprecationWarnings W
----- ----------- ------------------- ------------------------ -------------------------- -
Session UseSystemProxy Multiple Unset True -
User Multiple
AllUsers NoProxy

After setting the proxy configuration to ‘no proxy’ in PowerShell with the below command I was able to connect again.
Set-PowerCliConfiguration -proxypolicy noproxy

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s