How to open a command prompt on a remote computer

There are three tools that can do this:

  • PSExec – Not redistributable but free for download. No source code.
  • RemCom – BSD Licensed but not really maintained and I haven’t been able to get it to work in Windows 7. Source code available. Uses its own command line.
  • PAExec – Free to distribute but no source code. Uses same command line as PSExec.

So they all use the same command line to connect to a remote computer. I think I am going to go with PAExec because it is newer, maintained, distributable, and works in Windows 7.

PAExec \\RemotePC cmd.exe

However, with that command line, it can be confusing to have a command prompt open on your machine without a way to know it is actually a command prompt for a remote computer so it is a good idea to add a prompt.

PAExec \\RemotePC cmd.exe /k prompt $C%computername%$F$S$p$G

I hope this helps.

Leave a Reply

How to post code in comments?

*