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

DCOM received error "2147746132" from...

ADFS 3.0 Event ID 4625 | An Error occurred During Logon | Status: 0xC000035B

DFSR RPC replication errors 5014 1726 with large files over VPN