11 May 2021

Export Group Policy (GPO) to a File

 I recently needed to export a list of all GPOs within a client's environment to HTML file.  Rather than going through each one individually and exporting out, I used this simple PowerShell command to get the job done.

I create a new folder called GPOExport within C: root (C:\GPOExport), then ran the following command:

Get-GPO -all | % { Get-GPOReport -GUID $_.id -ReportType HTML -Path "C:\GPOExport\$($_.displayName).html" }