Get-VICredentialStoreItem -File C:\Users\*******\AppData\Roaming\VMware\credstore\vicredentials.xml | %{
Connect-VIServer -Server $_.host -User $_.User -Password $_.Password
}
Connect-VIServer : 11/24/2020 12:00:39 PM Connect-VIServer Could not resolve the requested VC server.
Additional Information: There was no endpoint listening at https://****-user/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:2 char:1
+ Connect-VIServer -Server $_.host -User $_.User -Password $_.Password
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Connect-VIServer], ViServerConnectionException
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_NameResolutionFailure,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
That -user suffix on the URI shouldn't be there.
Are you sure your VICredentialStoreItem has the correct Host property.
If you do a Connect-VIServer with the VCSA FDQN on the Server parameter, does that work?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Are you using an FQDN or an IP for the Server parameter?
Is the station from which you run this located in a different AD domain than the one in which the VCSA is sitting?
Does the VCSA certificate contain the IP and FQDN?
Did you set the PowerCLI configuration setting InvalidCertificateAction to Ignore?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
Can you still connect to the VCSA with the Web Client?
Which PowerCLI version are you using?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, we can hit the VCSA with the web client, but not with the "-user/sdk" suffix.
Name Version
---- -------
VMware.Vim 7.0.0.15939650
VMware.VimAutomation.Cis.Core 12.0.0.15939657
VMware.VimAutomation.Common 12.0.0.15939652
VMware.VimAutomation.Core 12.0.0.15939655
VMware.VimAutomation.Sdk 12.0.0.15939651
PowerCLI Version
----------------
VMware PowerCLI 12.0.0 build 15947286
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.0 build 15939652
VMware Cis Core PowerCLI Component PowerCLI Component 12.0 build 15939657
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.0 build 15939655
PowerCLI Version
----------------
VMware PowerCLI 12.0.0 build 15947286
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.0 build 15939652
VMware Cis Core PowerCLI Component PowerCLI Component 12.0 build 15939657
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.0 build 15939655
That -user suffix on the URI shouldn't be there.
Are you sure your VICredentialStoreItem has the correct Host property.
If you do a Connect-VIServer with the VCSA FDQN on the Server parameter, does that work?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Connect-VIServer with the VCSA FDQN on the Server parameter fails with "Invalid URI: The hostname could not be parsed".
VICredentialStoreItems were created with this command:
New-VICredentialStoreItem -Host x.x.x.x-User ****\***** -Password **********
We have tried both IP and FQDN after -Host. Current entries are FQDN
Why did you add the -User suffix on the Host parameter?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Perhaps it's missing a space after -Host,? I'll retry...
Yes, that was the issue. The VICredentialStoreItems were incorrectly added missing a space between the -Host and -User parameters. Correct format results in successful connection to vCenters. Thanks!