VMware Cloud Community
Orvion
Contributor
Contributor

PowerCli - InvokeVMScript AUTH ERROR

Hello,

I'm trying to call a script in a virtual machine. I need to launch this script as administrator

my command :

Invoke-VMScript -vm $VM -ScriptText $Myscript -ScriptType BAT -GuestUser "Administrator" -GuestPassword "Password"

I got this error

"An untrusted certificate authority was detected While processing the smartcard certificate used for authentication. Please contact your system administrator.

I can't understand why, i'm already connect to my vCenter...

any idea?

0 Kudos
3 Replies
LucD
Leadership
Leadership

Did you already try setting the InvalidCertificateAction to Ignore with the Set-PowerCliConfiguration cmdlet ?


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

0 Kudos
Orvion
Contributor
Contributor

I fix my problem by changing the local user in a administrator (from the AD) now my new problem is

My script load into my console screen but nothing more, i  can see that

2015-11-19 13_36_15-Postes Développeurs W7.png

After one hour, nothing more... and the script does nothing (i try a echo toto > c:\test.txt and nothing happend)

The command i'm using :

Invoke-VMScript -vm $VM ScriptText "runas /user:$GuestUser $MYSCRIPT" -ScriptType BAT -GuestUser $GuestUser -GuestPassword $GuestPassword

0 Kudos
LucD
Leadership
Leadership

Are all prereqs fulfilled =

You can check with my script from Will Invoke-VMScript work ?


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

0 Kudos