Currently have installed vSphere PowerCLI 5.8 Release 1. Tried previous releases. I have just one esxi host on a local network. I am wishing to be able to use powercli to automate some stuff with machines on the host through the use of a script. I can log in if I just put Connect-VIServer, press enter, then enter esxi host ip, which pops up username password box. Using the same username and password on the line.. Connect-VIServer -Server ipaddress -User username -Password "password" (with quotes on password) gives me error
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Connect-
VIServer -Server ipaddress -User username -Password "password"
Connect-VIServer : 11/30/2014 8:53:34 PM Connect-VIServer Cannot comp
lete login due to an incorrect user name or password.
At line:1 char:17
+ Connect-VIServer <<<< -Server ipaddress -User user -Password "password"
+ CategoryInfo : NotSpecified: (:) [Connect-VIServer], InvalidLog
in
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_Excep
tion,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
I've double,triple and double to the 15th power checked username and password.... what am I doing wrong?
I have tried adding -Port 443 with failure also. Same error
Hi,
why are you using the quotes around the password? Try it without quotes
Tim
Do you have any special characters in the password ?
Try placing the password between single quotes.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference