Highlighted
Enthusiast
Enthusiast

Cant connect to an ESX host with PowerCLI

Jump to solution

Guys,

I've had no problems connecting to the VC's in my enviroment using PowerCLI.  However when ever I try to use connect-viserver

I get an error message saying my password or user name is incorrect.  I'm using the root credentails fro the host and I know there are correct but I just cant connect.

Anyone have any ideas whats wrong?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
VMware Employee
VMware Employee

Use single quotes(') not double quoutes("). They have different meaning in PowerShell context Smiley Happy

Here is your fix:

$pass='!ITAdminE$X4!'

Regards,

Nedko Nedev

PowerCLI Development team

Regards, Nedko Nedev PowerCLI Development Team

View solution in original post

0 Kudos
7 Replies
Highlighted
User Moderator
User Moderator

Are these ESX or ESXi hosts ?

If they are ESXi hosts, is the Lockdown Mode perhaps enabled ?


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

0 Kudos
Highlighted
Enthusiast
Enthusiast

They are all ESX 4.1 hosts.

0 Kudos
Highlighted
VMware Employee
VMware Employee

Hi,

Can you connect using VMware vSphere Client?

If you can the problem with PowerCLI is most likely that you hava e special symbols in your password. You can use the following syntaxt to escape the chars:

$pass = 'pa$$word'

I hope this helps.

Regards,

Nedko Nedev

PowerCLI Develpment Team

Regards, Nedko Nedev PowerCLI Development Team
0 Kudos
Highlighted
Enthusiast
Enthusiast

You may have hit the nail on the head there the root password contains $

I followed your directions and typed the following

$pass="!ITAdminE$X4!"

connect-viserver 10.45.1.1 -User root -Password pass

BUt still got the same error and I have confirmed that I can connect directly to the host with the vSphere client.

Thanks.  

0 Kudos
Highlighted
VMware Employee
VMware Employee

Use single quotes(') not double quoutes("). They have different meaning in PowerShell context Smiley Happy

Here is your fix:

$pass='!ITAdminE$X4!'

Regards,

Nedko Nedev

PowerCLI Development team

Regards, Nedko Nedev PowerCLI Development Team

View solution in original post

0 Kudos
Highlighted
Enthusiast
Enthusiast

Thanks dude.  I'm still getting to grips with this powershell stuff.  

0 Kudos
Highlighted
VMware Employee
VMware Employee

You are welcome.

Regards,

Nedko Nedev

PowerCLI Development Team

Regards, Nedko Nedev PowerCLI Development Team
0 Kudos