Remote command prompt on Windows

November 2nd, 2008 · 2 Comments

Email This Post Email This Post

Ever wonder how to access command prompt of another Windows PC on your network so that you can execute batch files on the remote PC :??? ? PsExec allows you to do so. (Download link available below).

The PSTools package consist of many useful tools but today we going to talk about PSExec, one of the tools. Copy it to a convenience location and open a command prompt at local PC and issue the following:

psexec \\<remote_ip_address> cmd.exe /accepteula 

Replace <remote_ip_address> with the IP address of remote machine. “/accepteula” allows you to bypass user agreement window and accept it automatically.

If you are working in a workgroup instead of domain, make sure the same Windows user account exists in both local and remote PC. If not, create one under Control Panel > Administrative Tools > Computer Management.

Note: If you received the following error:

The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.

It may due to the fact that both local and remote PCs are in different domain. A workaround is shown below:

  1. At local PC, go to “Start” > “Run” > type in “\\<remote_ip_address>”.
  2. You will be prompted to enter username and password to access shared folders of the remote PC. Do so.
  3. Once you are able to see a list of folder, go back to command prompts and use PSExec.

That’s it. Hope you will take it into good use.

[Download PSTool here]

Reference
Official Website

Related posts:

  1. Windows XP restarting on every boot
  2. This is what happened if you use Windows


Tags: Windows

2 responses so far ↓

  • 1 Malaysia » SAS | Malaysia // Nov 2, 2008 at 5:13 pm

    [...] Remote command prompt on WindowsEver wonder how to access command prompt of another Windows PC on your network so that you can execute batch files on the remote PC ? PsExec allows you to do so. (Download link available below). The PSTools package consist of many … [...]

  • 2 bharath vn // Oct 23, 2010 at 11:58 pm

    I’m seeing the same problem. I can get around it by using the -d argument, but that means I don’t get back the return code from the process I started remotely.

    It gives the workaround, but not ideal.

Leave a Comment

CommentLuv badge

© 2006–2010 Now Eating — Sitemap

Switch to our mobile site