0

I have been trying to remotely execute some scripts and run some programs on a remote virtual machine on a server. The command I have been using is Invoke-command After going through all the troubles to make it work properly with the right authentications and credentials and internal password, I now can finally invoke some executables from my local computer. However, as I was trying to run notepad.exe, it only showed up in the background processes, meaning that I couldnt see any notepad UI whatsoever. Does anyone know what the solution to this is ? Thank you!

FrozenLand
  • 259
  • 1
  • 4
  • 14
  • 5
    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). From the accepted answer: *[psexec](http://technet.microsoft.com/en-US/sysinternals/bb897553.aspx) with the -i parameter is able to do what you want, but you have to specify which of the sessions (users) you want it to show up in.* – Anthony Neace Sep 19 '13 at 18:59
  • 1
    possible duplicate of [start remote process within the context](http://stackoverflow.com/questions/6178437/start-remote-process-within-the-context) – MDMoore313 Sep 19 '13 at 19:36
  • @Hyper Anthony How Do i specify the user? Is that the same as the argument for -u and -P? I honestly have tried, and logged in as both the local admin and my corporate account, but the simple mspaint.exe simply refuses to show up on either session. – FrozenLand Sep 19 '13 at 21:39
  • sorry guys I am not really sure which site this question belongs to. I think stack overflow is more for programmers, and super user is for computer enthusiasts, but scripting in network environment and system configurations--not sure which category it is in – FrozenLand Sep 19 '13 at 21:40
  • Try `-i [session]` with the appropriate sessionID from the remote machine. The psexec documentation I linked describes it a bit. I think it defaults to 0 if you don't specify an ID. Also here: http://stackoverflow.com/questions/5258225/problem-executing-psexec – Anthony Neace Sep 19 '13 at 21:46

0 Answers0