Thursday, October 15, 2009

PsExec

Handy little toolset for running remote commands on other Windows computers on Daily Cup of Tech.

Excerpt below....

For those of you who know the power of the command line, you also know that it is really useful to be able to run some of these command line tools remotely. There are a number of different ways to do this. I would like to share with you a couple of my favorites.


PsExec

If you are not familiar with PsExec, then this is going to be a bit of a revelation for you. PsExec is a freeware program that allows you to execute a command on a remote machine. If that command is a command line program, it will send the output of that command back to you.

The real trick comes when you run the command console. Try this command:

psexec \\RemoteComputer cmd.exe

where \\RemoteComputer is the name or IP address of the remote computer (Make sure you use the \\ otherwise the command will fail.)

What this does is connect to the remote computer and then open a command prompt on the remote machine. You can then work with this new command prompt and it will execute all of your actions on the remote system!

In order for this to work for you, you need to have the admin$ share active on the remote computer (which it is by default) and you need to have account information with administrative access to the system. This is mainly used in situations where you have a Windows network and you are the administrator of the network.

No comments: