Update group policy (or run any command) remotely using Powershell

2015-06-11 10:34:55 +0000 - wiseindy

This script allows you to run any command remotely using Powershell on your network. I usually use this to update group policy configurations on all PCs on my network remotely.

Note: In Windows Server 2012 & Windows Server 2012 R2, you can run the Invoke-GPUpdate PowerShell cmdlet ro refresh group policy on any Windows 8 computers on your network. More information here.

What you will need:

What this script does:

When you run it, you’ll see some output like: Starting cmd on PC1-USRNAME... on PC1-USRNAME... cmd exited on PC1-USRNAME with error code 0.

error code 0” means it has completed successfully without any errors.

Additional syntax:

(header image source: interfaceit.com)