0

I am trying to execute the following powershell script from a Remote machine. It is working fine when running the script locally.

I am able to see the notepad, when I execute it from remote machine, I am not able to see any notepad.exe process in Task Manager.

OpenNotepad.ps1:

Start-Process notepad.exe
if($?)
{
write-host "SUCCESS"
}

else
{
write-host "FAIL"
}

My Remote Script

Invoke-Command -Session $session -command "C:\Users\username\Desktop\OpenNotepad.PS1"
henrycarteruk
  • 12,708
  • 2
  • 36
  • 40
Chandru M
  • 133
  • 1
  • 7
  • http://stackoverflow.com/questions/18748349/powershell-using-start-process-in-pssession-to-open-notepad – David Brabant Apr 20 '17 at 12:05
  • 2
    Possible duplicate of [Powershell Using Start-Process in PSSession to Open Notepad](http://stackoverflow.com/questions/18748349/powershell-using-start-process-in-pssession-to-open-notepad) – James Woolfenden Apr 20 '17 at 12:16

0 Answers0