Wednesday, 11 September 2013

Using Start-Process in PSSession

Using Start-Process in PSSession

I've created a pssession on a remote computer and entered that possession.
From within that session I use start-process to start notepad. I can
confirm that notepad is running with the get-process command, and also
with taskmgr in the remote computer. However, the GUI side of the process
isn't showing. This is the sequence I've been using:
$server = New-PSSession -ComputerName myserver -Credential mycreds
Enter-PSSession $server
[$server]: PS C:\>Start-Process notepad -Wait -WindowStyle Maximized
The process is running, but while RDP'd to the box, notepad does not open.
If I open notepad from the server, a new notepad process begins. I also
tried by using the verb parameter like this:
[$server]: PS C:\>Start-Process notepad -Wait -WindowStyle Maximized -Verb
Open
Same result tho... Process starts, but no notepad shows. I've tried this
while remoted into the box (but issued from my local host) as well as
before remoting into the server.

No comments:

Post a Comment