I installed PS 1.0 on a remote PC (RPC001). I used the Windows Sysinternals tool PSExec.exe to execute the following process on the remote control:
PSExec \\RPC001 -u myID -p myPWD PowerShell C:\script\StartPS.ps1 par1 par2
Now I can see the PowerShell.exe process running on the remote PC, but actually does nothing, it just hangs there. I tried putting the simple "Write-Output / Host" code in a script line. I run the same script on a remote RTS, it works there.
Not sure if I will skip anything else to run the script using PSExec, or is this a limitation of PSExec.exe. I would like to run a PS script on a remote computer to do something there locally (compress some files locally and delete old files) from my window.
I asked a similar question in Stackoverflow: Run a remote process using powershell . Don suggested I use PSExec. This sounds like an alternative way to solve the problem. However, I cannot get it to work with PowerShell. Any way to get the PS to work on a remote PC?
By the way, I can not use PS 2.0, because my network does not allow me to install Windows XP SP3, which is required for PS 2.0.
source share