The gpupdate command refreshes a computer's local Group Policy, and any Active Directory-based group policies.
How To Run Gpupdate
Ok gpupdate basics then on to your script. You are doing the user separately, no need to run 2 commands. Be aware that doing a /force on a lot of machines at the same time can cause problems with your DC's and the network. It needs to be an online script for the user to update here is the easy way to do gpupdate via KScript on v3.7 Here is with. Gpupdate command is used to update Group policies in Windows operating system Domain. There are different options to use with the gpupdate but one of the most used option is.
Availability
What Does Gpupdate /force Do
Gpupdate is an external command and is available for the following Microsoft operating systems as gpupdate.exe.

Gpupdate syntax
| /Target:{Computer | User} | Specifies that only user or only computer policy settings be refreshed. By default, both user and computer policy settings are refreshed. |
| /Force | Reapplies all policy settings. By default, only policy settings that have changed are applied. |
| /Wait:{value} | Sets the number of seconds to wait for policy processing to finish. The default is 600 seconds. The value '0' means not to wait. The value '-1' means to wait indefinitely. When the time limit is exceeded, the command prompt returns, but policy processing continues. |
| /Logoff | Causes a logoff after the Group Policy settings are refreshed, which is required for those client-side extensions that don't process policy on a background refresh cycle but do during log on. Examples include user-targeted Software Installation and Folder Redirection. This option has no effect if there are no extensions called that require a logoff. |
| /Boot | Causes a reboot after the Group Policy settings are refreshed, for those client-side extensions that don't process policy on a background refresh cycle but do at startup. Examples include computer-targeted Software Installation. This option has no effect if there are no extensions called that require a reboot. |
| /Sync | Causes the next foreground policy application to be done synchronously. Foreground policy applications occur at computer boot and user login. You can specify this for the user, computer or both using the /Target parameter. The /Force and /Wait parameters are ignored if specified. |
Gpupdate examples
Running the command alone refreshes the computers policies as shown below in the example output.
Additional information
- See our Active Directory definition for further information and related links on this term.
There are three ready answers to ‘how often does group policy update?

- COMPUTER CONFIGURATION and USER CONFIGURATION changes automatically refresh every 90 minutes with a random offset of upto 30 minutes
- When you run gpupdate /force
- When you reboot

All three of these assume you are on a single server domain. If you have multiple servers you need to also add the time it takes to replicate the changes to the DC closest to the PC in question. The default refresh times can be changed… also through Group Policy, see: Computer Configuration, User Configuration .
