Joined: 18 Jan 2004
|Posted: 22.10.2009, 10:15 Post subject: How to execute program or script on remote computer
|Sometimes administrator in domain or workgroup needs to run program or batch script on remote computer with administrative rights or with specific credentials.
Normally, one would need to login to remote computer as administrator, and execute script locally.
But using Sysinternals PsExec.exe you can do it remotelly:
1.) Download Sysinternals' PsExec, which is part of PsTools package http://technet.microsoft.com/sl-si/sysinternals/bb896649(en-us).aspx
2.) Extract the package to your SERVER's executable path, or to batch file location. Actually, you only need PsExec.exe file.
3.) To execute the SCRIPT.BAT, for example, on remote computer named "COMPUTER5", issue command like this:
psexec \\COMPUTER1 -c -u DOMAIN\Administrator -p password SCRIPT.BAT