How to run a command remotely on computers

by [Published on 12 Feb. 2014 / Last Updated on 12 Feb. 2014]

Advertisement GFI LanGuard your virtual security consultant. Scan your LAN for any vulnerability and automate patch management for Windows, Mac OS & Linux. Get your FREE trial now!

GFI LanGuard is the essential tool for sysadmins:

  • Automate multiple OS patching
  • Scan for vulnerabilities
  • Audit hardware and software
  • Run compliance reports

Your FREE trial awaits:

Download a 30 day, fully functional, free trial which also includes GFI technical support.

No credit card required

This tip shows how you can run a command on a remote computer.

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 call create “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

Featured Links