Command-Line Utilities

Before we close up the chapter, I wanted to talk about the two most popular command-line management tools for GP. Although I've mentioned both of these utilities earlier in this chapter, I wanted to give each of them a thorough treatment in this section for easier reference and use.

GPUpdate

GPUPDATE will refresh Group Policy settings that are stored either on individual machines or through Active Directory. It's fairly straightforward to use.

To refresh the GP settings on the current workstation, just issue the GPUPDATE command itself:

gpupdate

You can target either computer or user settings using the /target switch. If the switch is omitted, both computer and user settings are refreshed. To refresh computer settings on the current machine:

gpupdate /target:computer

You can force the refresh of GP settings with the /force switch:

gpupdate /target:computer /force

Finally, you can force a logoff and/or a reboot with the /logoff and /boot switches, respectively:

gpupdate /logoff
gpupdate /boot

GPResult

GPRESULT will return a listing of all policies applied to a user and computer, the OUs in which the computer and user are located, the site they are in, and a lot more information. The remote computers need to run at least Windows XP or Server 2003 for GPRESULT to return accurate information.

You can return a simple report using the currently logged on user at your workstation by simply issuing the command itself without any switches:

gpresult

The following is a sample of the ...

Get Windows Server 2008: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.