The Remote Desktop feature is the most common way to control a Windows box remotely, but Remote Desktop isn't the tool for every remote control job. Sometimes you need something simpler than Remote Desktop, one that lets you run a remotely executed command instead of providing you with an entire interactive login session.
Mark Russinovich has a utility that fulfills that exact need—running a remotely executed command instead of providing an entire interactive login session. in fact, he's offered it for some time, and I wish I had discussed it sooner. PsExec (now at version 1.82) is a command-line utility for sending commands to another system in the manner of a telnet client.
The utility requires no installation; it runs anywhere as-is. PsExec 's minimum requirements are a remote host to execute on (either an IP address or a machine name), and a command to execute. You may also need to supply a user and password combination that's valid on the remote host. If you have a file with a list of commands to execute, you can provide a reference to that as well.
PsExec's other options allow you to:
- Launch an interactive command prompt which runs on the remote system.
- Run the command in question on only a specific CPU or CPUs, when there's more than one CPU present in the target system.
- Copy a program to run to the target system, with additional version-control options (i.e., copy only if there's no edition of the same program or only an earlier one on the target).
- Run the program with reduced privileges, or in Vista, with Low Integrity.
- Run the program in the System account.
- Run the program with a specific priority (i.e., low or realtime).
Here are three more things to keep in mind when using this tool.
- PsExec communicates with remote systems via port 445, which will need to be unblocked. (For this reason PsExec is easier to use in a LAN than over the Internet.)
- If you're attempting to connect to an XP Professional box, make sure "Simple file sharing" is turned off. When it's turned on, network users authenticate automatically as guests and can't make a properly authenticated connection.
- Make sure you can connect with an administrative account name (one which has a valid password; accounts with no password set will not be able to connect). The Sysinternals forum has a post about the admin account name issues as well as other issues with the program.
About the author: Serdar Yegulalp is editor of the Windows Insight, (formerly the Windows Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more than 12 years of Windows experience under his belt, and contributes regularly to SearchWinComputing.com and SearchSQLServer.com.
More information on this topic:
- Tip: Remote Desktop Connection tool resolves Vista and XP snafu
- Topics: Remote desktop management
- RSS: Sign up for our RSS feed to receive expert advice every day.