TheVMinator
Expert
Expert

Connect-omserver fails

Jump to solution

Can't connect to vROps using powercli - get this error:

Connect-OMServer : 12/16/2016 7:20:14 PM Connect-OMServer The provided username/password

or token is not valid. Please try again. 

At line:1 char:1

+ Connect-OMServer vropsnyc001 -User john.anders -Password P@ssw0rd

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

  + CategoryInfo : NotSpecified: (:) [Connect-OMServer], OMException

  + FullyQualifiedErrorId : OM_ConnectivityServiceImpl_ConnectOMServer_ByUserNameAndPassword_Serve

  rError,VMware.VimAutomation.vROps.Commands.Cmdlets.ConnectOMServer

However, this username and password is the same one I use to authenticate to vROps through the web UI.  When I connect through the webUI, I'm specifiying the AD domain under "Authentication Source", and it works.  Is it possible that my account has permissions to log in through the web UI but not via the command line? 

0 Kudos
1 Solution

Accepted Solutions
dtaliafe
Hot Shot
Hot Shot

Use the name of your authentication source in vROps shown here:

authsource.jpg

You can also use the "-AuthSource" parameter to specify this:

Connect-OMServer -Server vrops.mydomain.com -User username -Password password -AuthSource "Source Display Name"

Using username@authsource without the "-AuthSource" parameter will also work, but I didn't see any reference of this in the cmdlet's help.

View solution in original post

0 Kudos
6 Replies
grhohertz
Enthusiast
Enthusiast

Use a fully qualified user / domain / import source name:

user@domain@importsource

Where import source is the label you gave your AD Auth source in vROps.

TheVMinator
Expert
Expert

Ok thanks.  Where exactly do I find my AD auth source that was configured in vROps?

0 Kudos
grhohertz
Enthusiast
Enthusiast

Administration -> Authentication Sources (in 6.2)  It would be the "Source Display Name"

Capture.PNG

TheVMinator
Expert
Expert

OK many thanks - one more question - for "domain" is that my active directory domain?  My dns domain?  Do I include the .com / .net in it?  Where exactly could I look in the UI to make sure the "domain" I specify is the one vROps is expecting?

0 Kudos
dtaliafe
Hot Shot
Hot Shot

Use the name of your authentication source in vROps shown here:

authsource.jpg

You can also use the "-AuthSource" parameter to specify this:

Connect-OMServer -Server vrops.mydomain.com -User username -Password password -AuthSource "Source Display Name"

Using username@authsource without the "-AuthSource" parameter will also work, but I didn't see any reference of this in the cmdlet's help.

0 Kudos
SergOO
Enthusiast
Enthusiast

Connect-OMServer -Server myserverOPMan -User Admin -Password mypassword -Force

0 Kudos