Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to start an application remotely. I am using the following PsExec command:

PsExec \\computerOne -u Domain\User1 -p 123456 -x "C:\Windows\System32\calc.exe"

I tried to use -i so that the program interacts with the desktop:

PsExec \\computerOne -u Domain\User1 -i 123456 -x "C:\Windows\System32\calc.exe"

but that does not work. The error from the second example is:

calc.exe exited on computerOne with error code -1073741502"

If I omit the specification and just write the path of the exe, the process is listed in the taskmanager but I can not see any UI. Do I have to change any settings on my Desktop on which I want to start the program?

share|improve this question
up vote 6 down vote accepted

What you are seeing is likely to be an effect of Session 0 isolation - psexec installs and starts a new service on the remote machine, but the default session it is starting your process in is 0, and thus unavailable to the currently logged on user (at least on from Windows Vista / Server 2008). You need to specify the session number after the -i parameter. You can query the currently logged on users (and their session numbers) using the quser /SERVER:computerOne command beforehand.

For quick&dirty testing you can assume that the session ID of the first interactively logged-on user is "1".

share|improve this answer
Thank you. It works fine. – andreaspfr Feb 7 '12 at 12:33

You can also just take out the -x and replace with -I, it should open up PsExec \computerOne -u Domain\User1 -p 123456 -i "C:\Windows\System32\calc.exe"

share|improve this answer

The root-cause appears to be leaky handles made by the Console.Write method in Microsoft.powershell.consolehost.dll. The -1073741502 exit code in hex is 0xC0000142 (status_dll_init_failed).

This appears to be isolated to Windows 7 & 2008 (as per Microsoft's KB2701373).

Side-Note: Several "Fixes" elsewhere on the Internet are attributed to doing some sort of magical incantation, then closing PowerShell & opening a new instance. However, 'restarting' PowerShell is what actually temporarily solves the problem.

share|improve this answer
This looks like you were answering a different question. This one was not about PowerShell but about PSExec. – the-wabbit Jun 4 '15 at 11:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.