Tried to start a process on a remote machine but failed, why?
i used following command implement action, failed.
invoke-command -computer tempmachine -scriptblock{start-process cmd.exe -argumentlist "/k c:\temp\temp.exe 1"}
when logon machine tempmachine, , run command
start-process cmd.exe -argumentlist "/k c:\temp\temp.exe 1"}
locally, can start temp.exe
i got workaround
ps c:\> $s = new-pssession -computername localhost
ps c:\> icm -session $s -scriptblock {start-process -filepath "powershell.exe" -argumentlist "-windowstyle hidden" }
this creates process. however, in task manager, make sure select show processes users.\
hth
ravikanth
http://www.ravichaganti.com/blog
twitter: @ravikanth
powershell 2.0 remoting - ebook
Windows Server > Windows PowerShell
Comments
Post a Comment