Contains two useful functions to be used in conjunction with the Group Policy module. One is get-gplinks, which returns the paths of all the OUs that are linked to a given GPO. I thought that this was an important part of the GUI that was missing from the module.  The other is search-GPOReport, which returns the GPOs that contain a certain string.  I use it to find GPOs that set Folder Redirection.  Both have a fair amount of documentation when used with Get-Help -detailed

As to setup, besides copying the file to the desired location, this script file has two "constants" at the top. One is for the LDAP server, and the second is for the Domain Root.  There are comments there that explain, but you will need to fill them in for your domain.

Enjoy, and please leave comments and questions!

  • Oops. Forgot one thing on the command above. It should be :

    [xml]$report = Get-GPOReport -Name "Default Domain Policy" -ReportType XML

  • Your approach for finding links for a given GPO is somewhat expensive, esp. in large AD environments and given the search filter above. An easier approach for finding GP links on a given GPO is:

    [xml]$report = Get-GPOReport -Name "Default Domain Policy"


    In addition, my free GPMC cmdlets ( also includes a get-sdmgplink cmdlet that lets you search for links by GPO or SOM.

    Cool article though! I will also add that our GP reporting products (GPO Compare and Exporter) include PowerShell interfaces that let you do some neat things with GP data.