I am trying to push execution of an EXE on a set of machines on my network. I am probably missing something simple, but I cannot make the code below work.
PushIt("testpc") $executor = @ComSpec & " /c " & @ScriptDir & "\PsExec.exe \\" & $pcname & " -s -d C:\Windows\apptopush.exe" Return 1 EndFunc ;==>PushIt
I have full admin rights on all of the local PCs, including the 'testpc', so this is running with my domain credentials.
When I run it, the exe copies to the remote system, but the exe never executes on the remote system.
If I copy the command from the console, and paste it into a CMD shell from the script path, it runs the exe on the remote, no problem.
What am I missing?