VMware Cloud Community
satheeshsatz
Enthusiast
Enthusiast

PowerCLI not connecting to vCenter in another domain

Hi All,

I am facing an issue with powercli, one of the Vcenter with different domain is not connecting via powercli.

getting the below error.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Connect-VIServer : 7/17/2018 9:00:37 AM    Connect-VIServer        Could not

resolve the requested VC server.

Additional Information: There was no endpoint listening at

https://servername/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 servername

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (:) [Connect-VIServer], ViServer

   ConnectionException

    + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_NameR

   esolutionFailure,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVISer 

  ver

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I have already tried with get-powercliconfiguration and set-powercliconfiguration commands,.

but still no luck.

can someone help on this.

Regards, Satheesh
0 Kudos
9 Replies
LucD
Leadership
Leadership

Does the Web Client work with that  'servername'?

What action did you define for invalid certificate? Check with Get-PowerCLIConfiguration.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
LucD
Leadership
Leadership

That post only describes how to avoid errors due to an invalid vCenter certificate, nothing about an endpoint not answering.

Why are you so sure that that post "should help"?

Am I missing something?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
pawbur
Contributor
Contributor

Hey,

so yes, indeed my answer should help. It does not resolve the endpoint problem.

But I should notice (which I did not before, apologies) that I resolve my endpoint problem.

It was simply DNS not resolving the hostname. After I have fixed that, a problem was gone.

0 Kudos
tkdreamer2
Enthusiast
Enthusiast

Hello

I have the same problem since this morning just after upgrading from Powershell v2 to v5 to get the PowerCLI module. Before that everything was fine.
I have still access to the web client. Nonetheless, no certificate installed on my vCenters...

0 Kudos
LucD
Leadership
Leadership

Can you provide some more information?

Are your vCenter and the staion from which you tried the Connect-VIServer in different AD domains?

Did you use a SSO account for the Connect-VIServer? Or an AD account? And from which AD domain is that account?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
tkdreamer2
Enthusiast
Enthusiast

True ,my workstation and the Vcenters are on different domains.

I used my AD account, nonetheless the error appeared before entering credentials.

Anyway, I have a good news, here's the command to bypass the certificate problem: Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false

Connect-VIServer vcenter

Name                           Port  User                         

----                           ----  ----                         

vcenter                           443   DOMAIN\User

0 Kudos
lalitsharma
Contributor
Contributor

Check your system proxy:

 

Get-PowerCLIConfiguration returned ‘UseSystemProxy’:

# 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

0 Kudos
Thao145
Contributor
Contributor

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. 

0 Kudos