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.
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
Are you perhaps trying to do this from a 64-bit platform ?
See also
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
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...
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
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
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 => M`$oft
Regards,
- Angel
Luc, can you access all these accounts with VI Client?
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
Have you tried the poweshell connection with the user account with a domain i.e. test\test.user ?
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