gpupdate >nul_Windows Active Directory gpupdate命令教程更新和刷新组策略设置
gpupdate >nul
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.
Windows Active Directory或Windows AD使用gpupdate来更新和刷新Active Directory域中计算机的组策略。 该工具会每隔一段时间自动运行。 但是在某些情况下,此机制可能无法正常工作,并且计算机无法获取最新的域策略。
帮帮我 (Help)
Detailed help information about the gpupdate can be printed with the /? or /h like below.
有关gpupdate详细帮助信息可以用/?打印/? 或/h如下所示。
> 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.
我们将从一个简单的例子开始。 我们将只发布gpupdate并刷新计算机和用户的组策略。 正如我们可以看到以下屏幕截图一样,我们没有提供任何选项或参数。
> gpupdate
强制刷新和更新(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选项。
> 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.
如果专门测试用户策略,我们可能会从当前用户会话中注销。 我们可以将其作为/Logoff选项提供,如下所示。
> gpupdate /Logoff
策略更新后重新启动(Restart After Policy Update)
If the policy update will require some restart of the Computer we can use /Boot option like below.
如果策略更新需要重新启动计算机,我们可以使用/Boot选项,如下所示。
> 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.
如果我们只对更新和刷新用户组策略感兴趣,可以使用/Target:User选项指定它,如下所示。
> 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.
我们还可以通过提供如下所示的Computer仅更新具有类似选项/Target的计算机策略。
> gpupdate /Target:Computer
gpupdate >nul
更多推荐




所有评论(0)