You can use PSExec.exe from Microsoft to run a command remotely. PSExec.exe is part of PSTools from Microsoft which can be downloaded from here:
This tip shows how you can run a command remotely without using PSExec.exe.
Let’s say you want to run GPUpdate.exe command on a remote computer to refresh the GPO settings, use the below command:
- WMIC /node:ComputerName process create call “cmd.exe /c GPUpdate.exe”
The above command creates a process on the remote computer to execute “cmd.exe /c GPUpdate.exe” command line.
You can utilize above command to run any command remotely. You just need to replace ComputerName and "cmd.exe /c GPUpdate.exe" with a choice of your command!
About Nirmal Sharma
Nirmal is a MCSEx3, MCITP and was awarded Microsoft MVP award in Directory Services. He is specialized in Directory Services, Microsoft Clustering, Hyper-V, SQL and Exchange and has been involved in Microsoft Technologies since 1994. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles. Nirmal can be reached at email@example.com.