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?
Did you already try setting the InvalidCertificateAction to Ignore with the Set-PowerCliConfiguration cmdlet ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
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
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
Are all prereqs fulfilled =
You can check with my script from Will Invoke-VMScript work ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference