0
Using Windows Powershell, this opens notepad.
notepad.exe
But this, which is meant to remote into a virtual machine and open notepad there, does not. Instead, the process starts but the GUI is hidden.
$s = New-PSSession -ComputerName MyVirtualMachine
Invoke-Command -Session $s -ScriptBlock {notepad.exe}
I need to know a few things.
- How do I start a process with Powershell remoting such that its GUI is visible?
- Why is the GUI invisible?
- If I follow your advice regarding item 1., what are the implications regarding how the process starts? I want the process to start as the user I am logged in as (same as credentials I am connecting Powershell with).
- I want to choose whether the process has administrator privileges (the credentials will) as I need to run tests on processes both with and without admin rights.
- Other factors you can think of which may affect how the process runs. I am testing software, so the behavior ought to be identical to a user double clicking on an icon.
This appears to be a duplicate, but not on superuser. Here are related questions on other SE sites. http://stackoverflow.com/questions/3570517/running-remote-gui-app-in-powershell http://serverfault.com/questions/690852/use-powershell-to-start-a-gui-program-on-a-remote-machine
– Void Star – 2015-08-05T18:28:12.707How should I close this question? – Void Star – 2015-08-05T18:28:32.780