GPUpdate (Group Policy Update) Command Explained

Photo of author

By Victor Ashiedu

Published

Do you want to know what GPUpdate is used for and how to run the command? Join me as I explain the Group Policy Update command.

Overview

The job of most SysAdmins includes creating and deploying Group Policy Objects (GPO). If you deploy a new GPO, you may want to test the GPO on some computers.

When you deploy your new GPO, you may not have the patience for client computers to process the GPO in their own time.

This is where the GPUpdate command comes in.

SysAdmins or users use this command to update multiple Group Policy settings on a Windows computer. The beauty of this command is that you can use it to update Group Policy settings on both local and remote computers.

It is important to mention that when you run this command, only policy settings that have changed are applied by default. However, you can reapply all policy settings by using the /Force parameter.

Before jumping to examples, let’s discuss the syntax and parameters of the GPUpdate command before we get ahead of ourselves.

Syntax and Parameters of the GPUpdate Command

The syntax of the GPUpdate command is…

 Gpupdate [/Target:{Computer | User}] [/Force] [/Wait:<value>] [/Logoff] [/Boot] [/Sync]

In the table below, I have a detailed explanation of each parameter and switch in the command syntax above.

Parameter NameGPUpdate Parameter Meaning/Notes
/Target:{Computer or User}Windows applies Group Policy settings either to a computer, the user signed into the computer, or both. When you run the Group Policy Update command, the command updates both computer and user policies, but you can use the /Target: switch/parameter to force only User or Computer policies to be updated.
/ForceWhen you run GPUpdate, by default, the command updates only policies that changed since the last update, however, if you want to force all group policy settings (existing and changed) to update, use the /Force switch/parameter.
/Wait:{value}Use the /Wait: switch/parameter to specify how long (in seconds) that the command prompt will wait for the policy to finish processing. If you do not specify a value with the /Wait: switch/parameter, GPUpdate will run for 600 seconds (10 minutes), then the command prompt will return, and the policy will continue processing in the background. If you do not want the command prompt to wait, specify /Wait:0. Otherwise, to wait indefinitely, specify /Wait:-1.
/LogoffSpecify the /Logoff switch/parameter to force the computer to log off the logged-in user after the policy finishes processing. This switch is useful because some Group Policy client-side extensions will not process while the user is logged in to the computer.
/BootThis is similar to the /Logoff switch/parameter. However, unlike the /Logoff switch, the /Boot switch/parameter forces the computer to restart. This ensures that any policy that requires the computer to restart is applied.
/SyncIf you specify the /Sync switch/parameter, the GPUpdate command forces the next foreground policy application to be done synchronously.

Some Group Policy Update Command Examples

Now that you know a bit about the GPUpdate (Group Policy Update) Command, it is time to see the command in action. In this section, I will share some real-life applications of this command.

How to Use GPUpdate with the /Force Switch

To run this command with the /Force switch, enter the command shown below.

GPUpdate /Force

How to Set Timeout When You Run GPUpdate Command

As I explained in this guide’s syntax and parameters section, you use the /Wait: parameter to specify a timeout. In essence, use this parameter to specify how long (in seconds) that the command prompt will wait for the policy to finish processing.

So, if I want the Group Policy Update command to timeout after 5 minutes, I will run the command below:

GPUpdate /Wait:300
300 seconds equals 5 minutes

How to Run GPUpdate As Admin

To run GPUpdate as admin, open command prompt as administrator. Then, run the GPUpdate command in the command prompt as normal.

How to Run GPUpdate on a Remote Computer

Unfortunately, the GPUdate command does not have any switch that allows it to connect to a remote computer. So, the only option is to use alternative tools.

One option would be to download PsExec – part of the Sysinternals toolset. Then, open a command prompt and run a command similar to the command shown below:

“PsExec \\RemoteComputerName Gpupdate”

Alternatively, you can use the PowerShell equivalent of GPUpdate, Invoke-GPUpdate. Here is a sample command…

Invoke-GPUpdate -Computer RemoteComputerName 

How to Run GPUpdate /Force and Restart the Computer With the /Boot Switch

By default, the Group Policy Update command updates only the policies that have changed since the last update. If you want to update all policies, use the /Force switch.

In addition to that, to restart the computer after updating the group policy objects, add the /Boot switch to the /Force switch. Here is what the command will look like…

GPUpdate /Force /Boot

A computer restart is required for those client-side extensions that do not process policy on a background update cycle but do process policy when the computer starts up. An example of client-side extensions group policy setting is computer-targeted Software Installation.

If there are client-side extensions that meet these requirements, the /Boot syntax will not have any effect.

How to Run GPUpdate /Boot /Sync

As I explained in the last example, the /Boot switch forces a computer to restart after it updates group policies. The /Sync switch, on the other hand, forces the next foreground policy refresh to be done synchronously.

If you’re wondering what “foreground policy refresh” means, wherever GPUpdate runs with a user logged in to the computer, the Group Policy Update is called a “foreground policy refresh.”

By default, “foreground policy refresh” occurs asynchronously. This means that Group Policy applies the policies one after the other.

In other words, when the Group Policy update command applies Group Policy updates asynchronously, one process depends on the outcome of other processes.

However, if you want the next Group Policy refresh that occurs when a user is logged in (“foreground policy refresh”) to occur synchronously, use the /Sync switch.

Unlike an asynchronous application of group policy settings, synchronous processing causes the processing to depend on each other’s outcome.

Therefore, synchronous processes have to wait for the earlier process to complete before the subsequent process can start.

So, when you run the command below, the Group Policy command will refresh the Group Policy settings on the computer. Then, it restarts the computer because you used the /Boot switch.

GPUpdate /Boot /Sync

When the computer restarts, the next time Group Policy refresh occurs, it will happen synchronously. Running this command depends on your unique situation.

How to Run GPUpdate to Apply Computer Policy Only

In the syntax and parameters section, I explained the syntax “/Target:{Computer or User}.” I said then that if you want a Group Policy update to apply only computer policies, you use the /Target: switch, then specify “Computer.”

So, to run GPUpdate to apply Computer Policy only, use the command below:

GPUpdate /Target:Computer

To show you how this works, I’ll run the command without the “/Target:Computer” switch. Then, I will run the command with the “/Target:Computer” switch.

Here are the results…

How To Run GPUpdate To Apply Computer Policy Only

As shown in the screenshot above, the first command reported that both the Computer and User policies applied successfully. On the contrary, the second command reports that only the Computer policy was applied successfully.

So, if you want GPUpdate to apply User Policy only, use the command below:

GPUpdate /Target:User

How to Run GPUpdate /Force in PowerShell

One of the reasons PowerShell is better than the traditional Command Prompt is that PowerShell can run Command Prompt but not the other way around.

So, you can run the “GPUpdate /Force” command in PowerShell, and it will work perfectly well.

Here you go, the command works in PowerShell!

Moreover, and more excitingly, PowerShell has its cmdlet equivalent of the GPUpdate command called Invoke-GPUpdate. So, if you want to run the PowerShell command, run the command below in PowerShell.

Invoke-GPUpdate
Before you run the above command, you must install the Group Policy optional feature on your Windows 11 computer. To install this tool, open the command prompt as administrator. Then, run the command below.
DISM /Online /Add-Capability /CapabilityName:Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0

How to Run GPUpdate /Force on a Remote Computer

The easiest way to run GPUpdate /Force on a remote computer is to use the PowerShell equivalent of the GPUpdate update command, Invoke-GPUpdate.

To achieve this, use the sample command below.

Invoke-GPUpdate -Computer RemoteComputerName -Force
It is important to mention that the -Force parameter in Invoke-GPUpdate works differently from the /Force switch in the traditional GPUpdate command. While the /Force switch forces all policy updates (changed and new), the -Force parameter Forces the Invoke-GPUpdate command to run without asking for user confirmation.

How to Fix the “GPUpdate is Not Recognised as an Internal or External Command” Error

If you receive the “GPUpdate Is Not Recognised As An Internal Or External Command” when you run the command, follow the steps below to fix it:

  1. Check that GPUpdate.exe is in “%SystemRoot%\system32” folder. Search %SystemRoot%\system32, then open the folder.

    Next locate GPUpdate. If the executable is in the %SystemRoot%\system32 folder, proceed to step 2 below.
How To Fix GPUpdate Is Not Recognised As An Internal Or External Command
  1. Add the %SystemRoot%\system32\GPUpdate.exe to the PATH environment variable. Search advanced system settings and open it.

    Then, on the Start-up and Recovery section, of the Advanced tab, click Environment Variables.

Next, under System variables, highlight Path, then click Edit.

How To Fix GPUpdate Is Not Recognised As An Internal Or External Command

When the Edit environment variables setting opens, click New. Then, enter %SystemRoot%\system32\GPUpdate.exe and click OK.

Frequently Asked Questions

1. What Does the GPUpdate Command Do?

The GPUpdate command updates the Group Policy settings on a computer you run the command.

2. What is the Difference Between GPUpdate and GPUpdate /Force?

While GPUpdate refreshes only the Group Policy settings that have changed since the last policy refresh, GPUpdate /Force refreshes ALL Group Policy settings.

3. How Long Should a GPUpdate Take?

The default Group Policy update schedule runs every 90 to 120 minutes. However, if you want to force a computer to refresh its Group Policy immediately, run the GPUpdate command.

How long it takes the GPUpdate command to finish depends on how many Group Policy settings the computer needs to refresh. The default behavior of this command is to force the command prompt to wait until all the policies have been refreshed.

Talking about the command prompt waiting, the command prompt will wait for up to 600 seconds; then, it will return. If, after 600 seconds, the computer is still updating Group Policy settings, the command prompt will return, but the policies will continue updating in the background.

To modify the 600 seconds, use the /Wait: switch, then specify how long you want the command prompt to wait before returning to its prompt.

4. What Triggers a Group Policy Update?

Two actions trigger an automatic Group Policy update.

i) when you restart a computer that belongs to a Windows domain.
ii) when a user logs on to a computer that belongs to a Windows domain

In addition to these action-triggered Group Policy updates, a periodic refresh happens every 90 minutes with a randomized offset of up to 30 minutes. So, the periodic refresh happens between 90 to 120 minutes.

5. Do I Need to Restart After GPUpdate?

Not necessarily. Most Group Policy updates may not require you to restart your computer.

However, some may require a computer restart. As a best practice, when you run GPUpdate, specify the /Boot switch.

When you specify the /Boot switch, if the Group Policy update requires a restart, GPUpdate will force the computer to restart.

Conclusion

If you’re a Windows SysAdmin that manages an Active Directory domain, your job may involve creating and updating Group Policy Objects. One of the tools you need to manage Group Policy updates is the GPUpdate (Group Policy Update) command.

This article is a deep dive into this important Windows command, and I hope you found it helpful.

If the guide answered all your questions about this Windows command-line tool, kindly spare 2 minutes to share your thoughts using the comments form (“Leave a Reply”) at the bottom of this page.

Alternatively, you can respond to the “Was this page helpful?” question below.

Finally, you may find our Windows Command Prompt Guides page helpful.

We go the extra mile to deliver the highest quality content for our readers. Read our Content Writing, Content Review, and Anti-Plagiarism policies to learn more.

About the Author

Photo of author

Victor Ashiedu

Victor is the founder of InfoPress Media, publishers of Ilifeguides and Itechguides. With 20+ years of experience in IT infrastructure, his expertise spans Windows, Linux, and DevOps. Explore his contributions on Itechguides.com for insightful how-to guides and product reviews.

Related Articles

Get in Touch

If this article does not meet your expectations, kindly let us know. We have various ways you can get in touch with us:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment