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.
Detailed help information about the
gpupdate can be printed with the
/h like below.
> gpupdate /?
Refresh and Update
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.
Force Refresh and Update
In some cases we need to force gpupdate if it is not working properly. We will provide the
/force option in this example.
> gpupdate /force
Logoff After Policy Update
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.
> gpupdate /Logoff
Restart After Policy Update
If the policy update will require some restart of the Computer we can use
/Boot option like below.
> gpupdate /Boot
Update Only User Policies
If we only interested with updating and refreshing User Group policies we can specify it with the
/Target:User option like below.
> gpupdate /Target:User
Update Only Computer Policies
We can also update only Computer policies with the similar option
/Target by providing the
Computer like below.
> gpupdate /Target:Computer