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

Popular posts from this blog

Group Policy Event ID 1058 Error Code 1326 (The user name or password is incorrect)

Suspicious event log Event ID: 4905

DCOM received error "2147746132" from...