PSExec

In case you haven’t noticed, I like to use free tools that allow me to manage systems remotely. I also ran an internal forum board with this exact information. But due to potential problems, I am disbanding the internal and only relying on this site.

MMC is built into Windows
SSH is mostly built into Linux
SSH is mostly built into Macintosh

PSTools Suite is probably the best I’ve come across – free and is now updated by Microsoft.

Pslist and Pskill are both very useful, but Psexec takes the cake. Pslist shows all running programs on a system:
pslist \\computername
Pskill will kill remote programs (or PIDs) on any system assuming the system isn’t locked up beyond the system services functionality.
pskill \\computername PID_or_Processname

Here are some simple commands I use every day:
Analyze remote system’s HD to see if it needs to be defragged
psexec \\somemachine -s -d defrag.exe c: -a
Force remote system’s HD to defrag
psexec \\somemachine -s -d defrag.exe c: -f
Run Internet Explorer and open it.thelibrarie.com website
psexec \\somemachine -i -d "C:\program files\internet explorer\iexplore.exe" http://it.thelibrarie.com
Install an MSI program
psexec -s -i \\somemachine msiexec -i c:\locationofmsi.msi
Open the Add/Remove Programs Applet
psexec -i -s \\somemachine control.exe appwiz.cpl

***EDIT***
Looks like this really doesn’t work much on Windows 7 due to security restrictions. I end up using pslist \\computername to list the running processes, and then taskkill /S computername /PID processID /F to actually kill the running process.

2 thoughts on “PSExec”

  1. I’m trying the Add/Remove Programs Applet with

    C:\>psexec -i -s \\remotecomputer -u uname -p pword control.exe appwiz.cpl

    I’m getting control.exe exited on remotecomputer with error code 1.

    any idea what could be the problem?

  2. As soon as you close the add/remove wizard window, the psexec command will show:

    control.exe exited on (computername/ip) with error code 1.

    Make sure that you have the newest version of PSTools installed as Microsoft released a patch for the OS that prohibits the use of the old one (in close to 90% of all cases that I could come across anyway).

Leave a Reply

Your email address will not be published. Required fields are marked *