Windows Active Directory or Windows AD uses
gpupdate
in order to update and refresh group policies of the computers in Active Directory Domain. This tool is automatically run at some intervals. But in some cases this mechanism may not work properly and the computer can not get recent Domain Policy.A policy is a setting made by a system administrator, and those policies are pushed down to each PC from Active Directory. Most policies are updated on a cycle; commonly when a user logs into a PC that's connected to the network.
- Open an elevated command prompt. To force apply only the changed policies, type or copy-paste the following command: gpupdate; To force update all policies, run the command: gpupdate /force; The commands above will update both User Group Policies and Computer Group Policies simultaneously.
- The Invoke-GPUpdate cmdlet allows you to schedule a remote Group Policy update for a specified computer with all the options that the GPUpdate.exe command-line utility provides. This allows more freedom to determine which set of computers is to be refreshed than if you schedule the refresh through the GPMC.
Detailed help information about the
gpupdate
can be printed with the /?
or /h
like below.We will start with a simple example. We will just issue
gpupdate
and refresh Group policy of Computer and Users. As we can see following screenshot we do not provide any option or parameter.In some cases we need to force gpupdate if it is not working properly. We will provide the
/force
option in this example.If specifically test the User Policies we may nedd to log off from current user session. We can provide this as
/Logoff
option like below.If the policy update will require some restart of the Computer we can use
/Boot
option like below.If we only interested with updating and refreshing User Group policies we can specify it with the
/Target:User
option like below.We can also update only Computer policies with the similar option
/Target
by providing the Computer
like below.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 /force
which will reapply all policy settings.![Windows gpupdate after network connections Windows gpupdate after network connections](/uploads/1/2/6/6/126635532/898580196.png)
Get Help
Even “gpupdate” command provides very basic features we may need to get some help about the options. We can list help information by using
/?
option like below. This will list options and option explanation of the “gpupdate” command.Force Only
We can force to reapply all group policy settings with the /force option. The default behavior of the /force option is only update changed policies.
As we can see from screenshot User and Computer policies are updated successfully.
Update Only User Policies
By default all policies will be updated with the “gpupdate” command. If we want to update only the policies related with the user objects wen need to specify the
/Target:User
options to the “gpupdate” command like below.Update Only Computer Policies
Alternatively, we can only update computer object-related policies with the option
/Target:Computer
like below.Force and Reboot
If we want to force and make the system restart or reboot we should provide the option
/boot
next to the option /force
like below.Force and Logoff Account
Gpupdate Cmd Windows 10
We can also log off from the current session or account after updating the group policy forcibly. We will provide the
/logoff
option after the option /force
like below.Gpupdate Force Update
Set Timeout To Force gpupdate
Updating group policy may take some time or run forever if there is a problem. This problem can be a network or domain-related problem. Especially in remote branches network problems are very popular. We can set a time that will stop the update if it is not completed. We call this a timeout and use
/w
option and provide a time.Force Gpupdate Via Powershell Windows 10
In this example, we will wait for
120
seconds in order to complete a group policy update.Force gpupdate with PowerShell
gpupdate
command can be used in PowerShell too. We can use -force
option like below with Invoke-GPUpdate
command.