Search This Blog

Wednesday 18 January 2012

Easily Produce HTML GPO Reports Windows 2008 Powershell

Challenge
As part of any discovery or health audit, It`s never been particularly easy to cleanly export a viewable and searchable report on the configured and deployed Group Policy Objects and their  placement.



Solution
With Windows PowerShell you can now simply run a 1 line command that will export all GPO`s in a single swoop to a presentable HTML Report.

Simply follow the below steps to export ALL GPO`s into and single HTML Report.

1. From Powershell Import the GPO PSCommandlets -
    Run  import-module grouppolicy

2. Run the following command (Just changing the domain, DC and the output path)
Get-GPOReport -All -Domain mytestdomain.COM -Server test-DC3 -ReportType HTML -Path  C:\temp\GPOReportsAll.html