Would the password by any chance contain special characters ?
Try placing the password between single quotesBlog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
No, no special characters. I did some more testing and it turns out the local user needs to be in the Power Users group on the local box (vCenter) in order to execute from a remote computer.
The user was only in the "Users" group - as soon as I changed the groups, it worked right away! thanks for taking the time to look at my post LucD.
Actually, it did not work the way I wanted it too.
If I remove the -user "user123" -Pass "user123" -Protcol Https
from the script and then run it in PowerCLI, I get prompted for the username and password - which I then manually enter and the script executes ok.
When I leave the -user and the -pass in the script, it fails and says bad username/password.
The password has no special characters.
I tried it without double quotes and just single quotes on the password and it still failed.
Nevermind LucD - nevermind - big stupid stupid mistake on my part and I'm embarrassed....sorry to waste your time!
No problem, glad you found itBlog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz