Steps to back up and restore AD GPOs using PowerShell

This article explains how to back up and restore GPOs using PowerShell versus using RecoveryManager Plus, our Active Directory backup and recovery tool. This article also explains how the GUI-based RecoveryManager Plus makes it easy for administrators to automate GPO backups and restore any version of a GPO instantly in a few simple clicks without having to write a single line of PowerShell script.

Windows PowerShell

PowerShell script to back up a GPO:

    Backup-GPO -Name '$GPOName' –Path $path
    Click to copy the script
  • Here, $GPOName refers to the name of the GPO you want to back up, and $path refers to the path to the location where the backup of the GPO must be stored.
  • Repeat the script for all GPOs that you wish to back up.
  • Note: Run the script every time a change is made to the GPO.
  • PowerShell script to restore a GPO:

    Restore-GPO -Name ‘$GPOName' –Path $path
    Click to copy the script
  • Here, $GPOName refers to the name of the GPO you want to restore, and $path refers to the path to the location where the backup of the GPO is stored.

RecoveryManager Plus

Steps to back up a GPO using RecoveryManager Plus:

  • Step 1: Navigate to Active Directory > Settings > Backup Settings.
  • Step 2: From the Select object types to backup field, select Group Policy.

Screenshot

Steps to back up and restore AD GPOs using PowerShell

RecoveryManager Plus will now back up all the GPOs present in your domain. Moreover, any change made to your GPOs will also be backed up as a separate version automatically.

Steps to restore a GPO using RecoveryManager Plus:

  • Step 1: Navigate to Active Directory > Restore.
  • Step 2: Select the GPO you wish to restore and click Restore.

Screenshot

Steps to back up and restore AD GPOs using PowerShell

That’s all it takes. There's no PowerShell scripting. Enjoy automated, hassle-free, GUI-based, point-and-click backup and restoration for GPOs.

» Start your free, 30-day trial now

Limitations of using PowerShell to back up and restore AD GPOs

  • The PowerShell script to back up GPOs has to be manually executed every time a change is made to the GPOs.
  • It is not possible to preview the properties of a GPO before restoring it.
  • Multiple GPOs cannot be restored simultaneously.

Overcome the limitations of PowerShell by using
RecoveryManager Plus to restore deleted objects.

  •  
     
  •  
  • By clicking 'Download now', you agree to processing of personal data according to the Privacy Policy.

Thank you for downloading!

Your download should begin automatically in 15 seconds. If not, click here to download manually.

  • Embark on your script-free AD Self-service password management with ADSelfService Plus.
  •  
  • By clicking 'Get your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thank you for downloading!

    Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Resources

A single pane of glass for Active Directory, Azure Active Directory,
Microsoft 365, Google Workspace, and Exchange Backup.
  • » Personal WorkDrive backup
  • » Backup retention
  • » Incremental backup