Backup individual group policy objects (GPOs) or all the GPOs in a domain.

      Backup-GPO [-Name] string -Path string
         [-Comment string] [-Domain string] [-Server string] [CommonParameters]

      Backup-GPO -All -Path string
         [-Comment string] [-Domain string] [-Server string] [CommonParameters]

      Backup-GPO -Guid <Guid> -Path string
         [-Comment string] [-Domain string] [-Server string] [CommonParameters]

   -All  Backup all GPOs in the domain.

   -Comment string 
         Include a comment for the backed-up GPO.

   -Domain string
         The domain containing the GPOs to backup, requires a trust relationship if not the current domain.

   -Guid Guid
         Specify the GPO to backup by its globally unique identifier (GUID).

   -Name string
         Specify the display name of the GPO to backup.

   -Path string
         The path to the backup directory; for example, "C:\Backups" or "\\Server64\Backups".

   -Server string
         The name of the domain controller that should complete the operation.
         Specify either a fully qualified domain name (FQDN) or the host name.
         For example: 
         Host Name: DomainController1

The current/default domain is that of the user that is running the session or, for startup and shutdown scripts, the computer.


Back up the "SS64" GPO to the C:\GpoBackups directory:

PS C:\> Backup-Gpo -Name SS64 -Path C:\GpoBackups -Comment "Weekly Backup"

Back up the GPO with the specified GUID:

PS C:\> Backup-Gpo -GUID 3a4a6473-6b2a-4c84-ab78-175e68d64bdf -Domain -Server DC1 -Path \\Server64\GpoBackups

Back up all the GPOs in the current domain to \\Server64\GpoBackups:

PS C:\> Backup-Gpo -All -Path \\Server64\GpoBackups

“I have a very strict gun control policy: if there's a gun around, I want to be in control of it” ~ Clint Eastwood

Related PowerShell Cmdlets

Restore-GPO - Restore one or all GPOs from a GPO backup.
Import-GPO - Import Group Policy settings into a specified GPO from a GPO backup.
Copy-CPO - Copy a Group Policy Object.

Copyright © 1999-2024
Some rights reserved