As a System Administrator we would want to run some simple scripts in multiple computers. Microsoft has some great tools to ease the job, PsTools is really powerful easy tool.
PsTools is a bundle, we are look at PsExec. Which can be used to run scripts on remote computers.
Below is a simple example to find uptime of multiple systems and dumping to a file.
- Enter the system names in a notepad and save as a batch file (eg. mc.bat)
- Have a script written and save it as a batch file. (eg. uptime.bat "systeminfo | find "Up Time")
- This script will write the uptime of the systems on the command prompt
- Now use the tool to run it. Ensure you are in the directory where the tool is. Also ensure admin share is enabled in the remote systems.
psexec @mc.bat -u "username" -p "password" /c "path to script"
- This will execute the script in the remote systems mentioned in the mc.bat file.
Just makes our task easier. We can lots with this. Have it downloaded and explored in the below link,
http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx
Enjoy Scripting!
2 comments:
This is cool stuff
THANKS Cute.... :)
Post a Comment