Automation

 View Only
  • 1.  PowerCli - InvokeVMScript AUTH ERROR

    Posted Nov 19, 2015 09:45 AM

    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?



  • 2.  RE: PowerCli - InvokeVMScript AUTH ERROR

    Posted Nov 19, 2015 11:40 AM

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



  • 3.  RE: PowerCli - InvokeVMScript AUTH ERROR

    Posted Nov 19, 2015 12:40 PM

    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



  • 4.  RE: PowerCli - InvokeVMScript AUTH ERROR

    Posted Nov 19, 2015 01:00 PM

    Are all prereqs fulfilled =

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