Quick Tip: Using PowerShell to generate a GPO report
Someone asked me today how to easily export a readable report of all GPOs applied to a system (they were performing a security audit and needed an easy to way to script this). Of course, I immediately thought of PowerShell! So, here’s how you can export a readable report of all GPOs applied to a system in question in PowerShell:
> Import-Module GroupPolicy > Get-GPOReport -All -ReportType Html -Path AllGPOsReport.htm
Of course, you can also use Get-GPOReport to generate a report for a specific GPO and/or export as XML, if you prefer.
Group Policy Cmdlet Prerequisites
To use the Windows PowerShell cmdlets for Group Policy, you must be running one of the following:
Windows Server 2008 R2 on a domain controller
–or–
Windows Server 2008 R2 on a member server that has the GPMC installed
–or–
Windows® 7 with Remote Server Administration Tools (RSAT) installed. (RSAT includes the GPMC and the Group Policy cmdlets)
http://technet.microsoft.com/en-us/library/ee461027.aspx