Script Makes Searching for GPO Settings a Snap

Using one of the sample scripts that ships with Group Policy Management Console (GPMC), you can quickly discover in which GPO a setting resides.

Readers

March 27, 2007

2 Min Read
ITPro Today logo

I often don't know in which Group Policy Object (GPO) a setting resides. Fortunately, I discovered a script—GetReportsForAllGPOs.wsf—that helps me quickly obtain this information. GetReportsForAllGPOs.wsf is one of the sample scripts that ships with Group Policy Management Console (GPMC). For each GPO in Active Directory (AD), GetReportsForAllGPOs.wsf generates an HTML file and an XML file that contains configuration and other types of information about the GPO. (You can also use this script to generate HTML and XML files for a specific GPO or for all the GPOs in a specific domain.)

You can find GetReportsForAllGPOs.wsf in the %programfiles% GPMCScripts directory. To use this script to search for settings, follow these steps:

1. Create a folder that will be used to store the HTML and XML files for the GPOs. For example, I created a folder named Exported GPO on the C drive.

2. Run the script GetReportsForAllGPOs.wsf from the %programfiles%GPMCScripts folder, following the syntax

CScript GetReportsForAllGPOs.wsf  GpoFiles 

where GpoFiles is the pathname to the folder you created in Step 1 (e.g., C:Exported GPO). Note that although this command appears on several lines here, you would enter it on one line in the command-shell window.

3. After the script runs, delete all XML files in the folder you created.

4. To search all HTML files for the parameter you want, right-click the folder you created and select Search. In the A word or phrase in the file text box, enter an appropriate search term. For example, if you need to find Windows Server Update Services (WSUS) parameters, you can enter the name of your WSUS server. (You can't enter WSUS as the search term because the word WSUS doesn't exist in the GPOs. The GPO setting to configure WSUS is Specify intranet Microsoft update service location.) Click Search to get a list of all the GPOs containing what you searched for.
—Peter Ekstorp

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like