Sunday, May 17, 2009

PsTools: Remote execution of commands in Windows

PsTools is a number of command-line tools that lets you execute useful commands remotely. Below is a list of tools included in the package which is free and can be dowloaded from the MS Technet site .
I have found a number of these tools very helpful:
PsExec: Lets you execute commands remotely. Use this command to start a command prompt:

psexec \\'computer name or ip' -u 'user' -p 'password' cmd.exe

PsKill: If you have a server that are maxing out its CPU and it takes forever to RDP to it, then you can use first PsList to show running processes and then PsKill to stop the process which is using the CPU.

PsShutdown: If you want to reboot a server via RDP it often hangs in the process. And if you haven't got ILO, then your screwed if you haven't got physical access to the server. Normally it helps to RDP to the console (Start -> Run -> mstsc /console) but if not PsShutdown lets you shut down the server or reboot it.

If, for some reason, you can't execute the commands remotely, then a trick is to make an ISO file containing the PsTools and mount that ISO on the VM. That will make the tools directly available on the VM.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.