Would you like to learn how to use Powershell to create a group policy backup? In this tutorial, we are going to show you how to create the backup of a GPO using the Powershell command-line on a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Related tutorial - PowerShell

On this page, we offer quick access to a list of tutorials related to PowerShell.

Tutorial Powershell - Group policy backup

As an Administrator, start an elevated Powershell command-line.

Windows 10 - powershell elevated

Create a directory to store the GPO backup.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

Create a Group policy backup.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

In our example, we created the backup of a group policy named MY-GPO.

Powershell - GPO backup

Restore a Group policy using Powershell.

Copy to Clipboard

Change the domain name.

Here is the command output:

Copy to Clipboard

Congratulations! You are able to backup a group policy using Powershell.

Tutorial Powershell - Backup all group policies

As an Administrator, start an elevated Powershell command-line.

Windows 10 - powershell elevated

Create a directory to store the GPO backup.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

Create the backup of all group policies

Copy to Clipboard

Here is the command output:

Copy to Clipboard

In our example, we created the backup of all GPOs using Powershell.

Powershell - Backup all GPOs

Restore all Group policies using Powershell.

Copy to Clipboard

Change the domain name.

Here is the command output:

Copy to Clipboard

Congratulations! You are able to backup all group policies using Powershell.