GROUP POLICY COURSE · PAGE 8 OF 14

GPO backup, restore, copy, import and migration tables

Backing up GPOs with GPMC and PowerShell, restoring deleted or broken GPOs, copying between domains with migration tables, dcgpofix, and what a GPO backup does not include.

What a GPO backup contains

A GPMC backup is a folder named by a backup GUID, with Backup.xml, bkupInfo.xml, a gpreport.xml settings report and a copy of the GPT (registry.pol files, security template, scripts, preferences). It includes the GPO's settings, its security (ACL), its GUID, its domain and its WMI filter link.

It does not include:

  • Links: they are stored on the OUs, sites and domain (gPLink). Export them separately (see below).
  • WMI filters themselves: export them from GPMC (Export on each filter) or back up the msWMI-Som objects.
  • IPsec policies stored in AD, and the central store ADMX files (back up the PolicyDefinitions folder).

A system state backup of a DC includes every GPO, link and WMI filter as part of AD and SYSVOL, but restoring a single GPO from it is slow. Use GPMC backups for everyday recovery and system state backups for disaster recovery.

Back up

# All GPOs into a dated folder
$path = "\\backupsrv\gpo\$(Get-Date -Format yyyy-MM-dd)"
New-Item -ItemType Directory $path -Force | Out-Null
Backup-GPO -All -Path $path -Comment "Nightly"

# One GPO before a change
Backup-GPO -Name "WS - Security Baseline" -Path \\backupsrv\gpo\changes -Comment "Before CHG1234"

# Links (not in the backup): save the OU link map next to it
Get-ADOrganizationalUnit -Filter * -Properties gPLink, gPOptions |
  Select-Object DistinguishedName, gPLink, gPOptions | Export-Csv "$path\links.csv" -NoTypeInformation

In GPMC: right-click Group Policy Objects > Back Up All…, or right-click a GPO > Back Up…. Manage Backups… shows every backup in a folder. Protect the backup folder: GPO backups can contain sensitive data such as scripts and preference items.

Run the backup as a scheduled task with a gMSA that has Read on all GPOs, keep several generations, and store a copy off the domain.

Restore

SituationUseResult
A GPO was changed by mistakeRestore-GPO or GPMC Restore from Backup…Same GPO, same GUID, settings and ACL from the backup; links untouched
A GPO was deletedManage Backups > Restore or Restore-GPOGPO re-created with its original GUID. Re-create the links.
Copy settings into another GPO (same or other domain)Import-GPO or GPMC Import Settings…Target GPO's settings replaced; target keeps its GUID, links and ACL
Duplicate a GPO in the same domainCopy-GPO or GPMC copy/pasteNew GPO with a new GUID, optionally with the source ACL
Default GPOs destroyed, no backupdcgpofix /target:domain|dc|bothDefault GPOs rebuilt with install-time settings; your changes are lost
# Restore the latest backup of one GPO
Restore-GPO -Name "WS - Security Baseline" -Path \\backupsrv\gpo\2026-12-04

# Restore a deleted GPO (by backup ID shown in Manage Backups or bkupInfo.xml)
Restore-GPO -BackupId 'b6f2…' -Path \\backupsrv\gpo\2026-12-04

# Put settings from a backup into a new GPO, mapping names with a migration table
Import-GPO -BackupGpoName "WS - Security Baseline" -Path \\backupsrv\gpo\2026-12-04 `
  -TargetName "WS - Security Baseline" -CreateIfNeeded -MigrationTable C:\mt\prod-to-test.migtable

# Copy a GPO, then link it
Copy-GPO -SourceName "WS - Base" -TargetName "WS - Base (Pilot)" -CopyAcl |
  New-GPLink -Target "OU=Pilot,OU=Workstations,DC=corp,DC=contoso,DC=com"

dcgpofix is a disaster-recovery tool only. Microsoft notes it does not restore the security settings of the Default Domain Controllers Policy to their original state; review the user rights afterwards. Restore from a GPMC backup whenever one exists.

Migration tables

Security principals (groups in user rights, restricted groups, security filtering) and UNC paths (scripts, folder redirection, software installation, drive maps) inside a GPO point to the source domain. A migration table (.migtable) maps them to the target domain during Import or Copy.

  1. In GPMC, right-click Domains > Open Migration Table Editor.
  2. Tools > Populate from Backup to list every principal and path in the backup.
  3. Fill in Destination Name for each entry (Same as source, None, Relative name or an explicit name), and validate with Tools > Validate Table.
  4. Use the table in the Import Settings wizard or with -MigrationTable.

Group Policy Preferences items are not translated by migration tables; fix their paths and accounts after import.

Local policy backup

  • LGPO.exe /b C:\lgpo-backup: backs up the local GPO (registry policy, security template, audit policy) in a GPO-backup format.
  • LGPO.exe /g C:\lgpo-backup\{GUID}: restores it, or imports a domain GPO backup into local policy.
  • secedit /export /cfg C:\sec.inf and auditpol /backup /file:C:\audit.csv for the security and audit parts only.

References: Backup-GPO, Restore-GPO, Import-GPO, dcgpofix limits.