How To Run Gpupdate

Run

  1. How To Run Gpupdate
  2. How To Run Gpupdate /force From Command Prompt
  3. How To Run Gpupdate

Here is an interactive tutorial: http://ior.ad/6YCl. The wscript.exe will wait until the gpupdate.exe is closed. If you choose 'false' it will not wait and just close independed of the gpudpate.exe. If you run the script with user rights (user logon script) it will update the user policy part. If you run it with computer rights (computer starup script) it will update the computer policy part.

How To Run Gpupdate

How To Run GpupdateHowWindows gpupdate after network connections
Learning has never been so easy!

Ever needed to run a cmd on a remote computer such as gpupdate? this will show you how.

This of course assumes you have admin access to the remote PC

2 Steps total

Step 1: Open an Administrative Command Prompt

Open the Command Prompt windows. Make sure you run as admin and use credentials with admin rights on the remote machine

Step 2: Run your command

Use this command.

WMIC /node:'Computer Name' process call create “cmd.exe /c GPUpdate.exe /force”

Just Replace 'Computer Name' with the name of the remote computer. To be safe keep the ' around the computer name. without the quotes some characters seem to cause issues with this command

This example will run the command GPUpdate.exe /force If you wish to run something else. replace this with the command you wish to run.

That is it. your command will execute on the remote system. The only downside to this method is that you can't see the command execute or the results if there was a error.

But in a pinch this can be a very handy command

References

How To Run Gpupdate /force From Command Prompt

  • How to run a command remotely on computers

How To Run Gpupdate

How to run gpupdate /force in powershell

6 Comments

  • Thai Pepper
    bobmccoy Mar 4, 2016 at 10:17pm

    PSExec tends to be much faster. And if you have PowerShell remoting enabled, that is another option.

  • Datil
    Laurel Raven Mar 5, 2016 at 01:11am

    bobmccoy, that's true, but those are not always options. I recently had to do this (actually figured out how to do it with Invoke-WmiMethod, because I'm stubborn and wanted it to be a PowerShell solution), and in this environment, PSExec is disabled by security policy, and PS Remoting has never been enabled. I'm working on getting PS Remoting turned on, but having a backup to try for when those fail is always good.

  • Mace
    molan Mar 5, 2016 at 02:05am

    Megaman x4 pc version. And it has the benefit of not needing to add anything to a base windows install. It is just there and enabled

  • Serrano
    julianddavidson Mar 5, 2016 at 07:14am

    Batchpatch is also good for this kind of thing. If you need to do it on lots of computers.

  • Jalapeno
    robb4 Jul 12, 2018 at 07:50am

    You'll also need to have Windows firewall already allowing WMIC in. This is not set by default. Guide to deploy the GPO is here:
    https://community.spiceworks.com/how_to/17452-group-policy-to-allow-wmi-access-to-remote-machine

  • Datil
    Peter (Action1) Sep 13, 2018 at 06:05pm

    if you need to run an application on multiple remote computers, I would recommend to use a third-party tool - Action1 can do this: https://www.action1.com/f/Free-Run-Application-with-Command-Line-atm-65.html