In this article, we’re going to show you how to export all Group Policies settings to a file or to an HTML report.
Why Export Group Policy Settings
Exporting Group Policy Object settings to a file can be used when you need to move a GPO to another forest, create a backup copy of configured policies, or get a handy HTML report of policy settings for further analysis.
The Group Policy Management Console (GPMC.msc), which is included with the Remote Server Administrative Tools for Windows (RSAT), allows you to back up, restore, and copy Group Policy Objects within or between domains.
In the console, right-click on the GPO you want and select Back up.

All policy settings including GPO permissions, GUIDs, WMI filter links will be saved to the specified folder. From this backup, you can later restore the GPO settings.
The PowerShell GroupPolicy module can also be used to back up GPO settings:
Backup-GPO -Name "gpoEnableFSAudit" -Path "C:\Backup" -Comment "Backup gpoEnableFSAudit $(get-date)"
Note. If the RSAT is installed on the computer, the GroupPolicy module is loaded automatically. We don’t recommend you to manually import the module.
You can export all the GPOs in a domain to a folder at once:
Backup-GPO -All -Path "C:\Backup"
Legacy: Export GPOs with Microsoft Advanced Group Policy Management (AGPM)
To export GPO settings to a CAB file, you can use Microsoft Advanced Group Policy Management (AGPM). This means you can’t restore AGPM exports with standard GPMC tools.
Important. Microsoft Advanced Group Policy Management (AGPM) reached End of Life on April 14, 2026. It is no longer supported by Microsoft and does not receive security updates/bug fixes. AGPM should not be used for new deployments. If you still have AGPM in your environment, you need to plan a migration to a supported GPO management and backup solution.
- Install AGPM 4.0 SP3 on the computer with GPMC;
- Open the Group Policy Management Console and navigate to the Change Control section;

- Right-click on the GPO on the Contents tab and select Export to;
- Specify the name of the file you want to export the GPO to.
How to Export GPO Settings to XML
You can export GPO settings to an XML file. This XML report contains detailed Group Policy Objects configuration that can be parsed programmatically. The file is similar in appearance and structure to the resulting Group Policy Settings report that you can generate on any Windows computer using the gpresult tool.
The command below saves the XML to a variable and parses it to extract details such as Organizational Unit links:
$xml = Get-GPOReport -Name "Default Domain Controllers Policy" -ReportType Xml
$GpoXml = [xml]$xml
$GpoXml.GPO.LinksTo


In case you want to export the report directly to a file, use the following command:
Get-GPOReport -Name "Default Domain Controllers Policy" -ReportType XML -Path "C:\PS\DefaultDomainPolicy.xml"
In case you want to export all GPOs in the domain to separate XML files, run the following command:
Don’t forget to ensure that the C:\PS directory exists before running these commands!
Get-GPO -All | ForEach-Object {
$safeName = $_.DisplayName -replace '[\\/:*?"<>|]', '_'
Get-GPOReport `
-Guid $_.Id `
-ReportType XML `
-Path "C:\PS\$safeName-$($_.Id).xml"
} How to Export GPO Settings to HTML
In this section, I will show you how to use PowerShell to export GPO setting in HTML format.
To export a single GPO to an HTML report:
Get-GPOReport -Name "Default Domain Controllers Policy" `
-ReportType HTML `
-Path "C:\PS\DefaultDomainPolicy.html"
If you want to export all Group Policy Objects in the domain to separate HTML files, use the following command:
Get-GPO -All | ForEach-Object {
$safeName = $_.DisplayName -replace '[\\/:*?"<>|]', '_'
Get-GPOReport `
-Guid $_.Id `
-ReportType HTML `
-Path "C:\PS\$safeName-$($_.Id).html"
} How can I export GPO settings to XML?
You can use the Get-GPOReport cmdlet with the -ReportType XML parameter to generate an XML report.
Can I parse GPO settings from an XML report?
Yes, XML reports contain detailed configuration data that can be parsed programmatically.
How do I export a GPO report directly to an XML file?
Use the -Path parameter with Get-GPOReport to save the report directly to a file.
Can I export all GPOs to separate XML files?
Yes, you can loop through all GPOs using PowerShell and export each one to a separate XML file.

