VMware Cloud Community
chowell
Contributor
Contributor

connect-viserver not working in PowerCLI 6.5.1

When I run  connect-viserver -Server vcenter -Credential(Get-Credential) I get:

Connect-VIServer : 'config.vpxd.sso.sts.uri' is invalid or exceeds the maximum number of characters permitted.

At line:1 char:1

+ Connect-VIServer -Server vcenter -Credential(Get-Credential)

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

    + CategoryInfo          : NotSpecified: (:) [Connect-VIServer], VimException

    + FullyQualifiedErrorId : VMware.Vim.VimException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

Tags (1)
0 Kudos
9 Replies
LucD
Leadership
Leadership

That looks as if your vCenter is pointing to an incorrect PSC.
Check the vCenter's Advanced Settings, more specifically the config.vpxd.sso.sts.uri entry


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

0 Kudos
chowell
Contributor
Contributor

I don't have that entry in my advanced settings.

0 Kudos
LucD
Leadership
Leadership

Can you connect when you specify the SSO administrator (default is administrator@vsphere.local)?
WHich vSphere version are you using? And is it a VCSA?


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

0 Kudos
chowell
Contributor
Contributor

Yes I can log into vcenter with the administrator@vsphere.local account. We just upgraded/migrated vcenter on Windows to vcsa 6.5.

0 Kudos
LucD
Leadership
Leadership

Just to make sure, that is a Connect-VIServer with the administrator@vsphere.local account?

If yes, there might be something wrong with the Authentication source(s).
When you do a Connect-VIServer without credentials, the SSO will use the credentials of the sessions from where you do the Connect-VIServer.I assume that would be an Active Directory account?

Can you try to remove/add the AD authentication source in SSO?


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

0 Kudos
chr1s86
Enthusiast
Enthusiast

I got the same issue 😕

Also upgraded from 6.0 Windows to vcsa 6.5d. Re-Add the domain does not work ...

Blog: http://vblog.hochsticher.de/
0 Kudos
chr1s86
Enthusiast
Enthusiast

I just added the vCenter Advances Parameters:

config.vpxd.sso.admin.uri

https://MyvCenter-Server.dom/sso-adminserver/sdk/vsphere.local

config.vpxd.sso.groupcheck.uri

https://MyvCenter-Server.dom/sso-adminserver/sdk/vsphere.local

config.vpxd.sso.sts.uri

https://MyvCenter-Server.dom/sts/STSService/vsphere.local

They were missing 😕

This worked for me Smiley Happy

Blog: http://vblog.hochsticher.de/
0 Kudos
The0ray
Contributor
Contributor

I had the same issue after upgrading from VCSA 6.0 to 6.5. I only had to add the one line

config.vpxd.sso.sts.uri  -> https://MYserver.FQDN/sts/STSService/vsphere.local

Thanks for posting!

0 Kudos
geneliverman
Contributor
Contributor

Just wanted to chime in and say that this is still a thing 6.7. The vCenter I ran into this on was upgraded from 6.5.

0 Kudos