VMware Cloud Community
tim5700
Contributor
Contributor
Jump to solution

Cannot connect using Connect-VIServer

I am new to using VI Toolkit for Windows.

When I try to issue the command Connect-VIServer -Server localhost -Protocol https -User tim.lewis -Password password

I get:

"Failed to connect to VI server at: with user tim.lewis. Login failed due to bad username or password."

I am using the correct username and password.

0 Kudos
1 Solution

Accepted Solutions
Niket
Enthusiast
Enthusiast
Jump to solution

Hi,

You are trying to connect to VC with user name "tim.lewis". It looks like you can not use the user name with dot and getting the bad user name password error. We tried it to connect to ESX directly with a user name having the dot and got the same error while able to connect with ESX using VI Client using the user name having dot in it (like your tim.lewis).

Thanks

Niket

View solution in original post

0 Kudos
9 Replies
LucD
Leadership
Leadership
Jump to solution

Are you perhaps trying to do this from a 64-bit platform ?

See also


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

0 Kudos
tim5700
Contributor
Contributor
Jump to solution

Nope, I am running 32-bit Windows Server 2003 Standard.

Tim Lewis, Systems Engineer

MCSE, MCSA, CCENT, VCP:VI3

502.424.2368 - Mobile

502.240.0404 - Office

502.240.0409 – Fax

- Providing Vision for Technology Solutions...

www.mirazon.com

0 Kudos
Niket
Enthusiast
Enthusiast
Jump to solution

Hi,

You are trying to connect to VC with user name "tim.lewis". It looks like you can not use the user name with dot and getting the bad user name password error. We tried it to connect to ESX directly with a user name having the dot and got the same error while able to connect with ESX using VI Client using the user name having dot in it (like your tim.lewis).

Thanks

Niket

0 Kudos
LucD
Leadership
Leadership
Jump to solution

It looks as if it is related to the whether the AD account is a pre-W2K account or not.

The Connect-VIServer cmdlet only seems to accept pre-W2K accounts, independent if they have a dot or not in the account name.

So provided you have an account like this

This will work

Connect-VIServer -Server <VC-server> -User test.w2kuser -Password <my-password>

Short

and long format

and this won't

Connect-VIServer -Server <VC-server> -User "test.user@test.local" -Password <my-password>


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

0 Kudos
aevrov
VMware Employee
VMware Employee
Jump to solution

Tim,

Does your password contain any special Powershell symbols that have to be escaped when passing as cmdlet arguments, like ' $ ', ' ` ' etc.. ?

If so, try escaping them by placing a ` before any special character - e.g. M$oft =&gt; M`$oft

Regards,

- Angel

0 Kudos
admin
Immortal
Immortal
Jump to solution

Luc, can you access all these accounts with VI Client?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Yes, I can log on to the VI Client with test.w2kuser and with test.user@test.local.


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

0 Kudos
Kevin_Smith
Contributor
Contributor
Jump to solution

Have you tried the poweshell connection with the user account with a domain i.e. test\test.user ?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Yes, that doesn't seem to work either.

But I'll try again tomorrow on a newer VC/ESX installation.


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

0 Kudos