Deutsch English

jk_poll at Twitter

RSS-Feed

Remote Management with PsTools

04.02.2009
Category: Windows/Citrix

PSToosl allows you to remotely run a command on one or even on more system at once. Here are some short examples (the syntax sometimes can be a little tricky):

Change the password of the user admin:

pspasswd.exe @pcs.txt -u admin -p password admin new_password

Import registry file from network share:

psexec.exe @pcs.txt -u admin -p password "c:\windows\regedit.exe" /s \\server\share\regfile.reg

Delete script in autostart and copy a new one:

psexec.exe @pcs.txt -u admin -p password cmd.exe /c del "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\logon.bat"
psexec.exe @pcs.txt -u admin -p password "c:\windows\system32\xcopy.exe" \\server\share\logon.bat "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\"

Remotely install NRPE_NT:

psexec.exe @pcs.txt -u admin -p password "c:\windows\system32\xcopy.exe" \\server\share\nrpe_nt\*.* "C:\nrpe_nt\"
psexec.exe @pcs.txt -u admin -p password "C:\nrpe_nt\NRPE_NT.exe" -i
psexec.exe @pcs.txt -u admin -p password sc config NRPE_NT start= auto
psexec.exe @pcs.txt -u admin -p password net start NRPE_NT