Skip navigation

Script Makes Searching for GPO Settings a Snap

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%\ GPMC\Scripts 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%\GPMC\Scripts folder, following the syntax

CScript GetReportsForAllGPOs.wsf

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

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.