Backing up all of the GPOs

Backing up a single GPO is fine and dandy, but using one single command to back them all up? Now that's what I'm talking about! Here is a command that will immediately back up every GPO in our domain:

Backup-Gpo -All -Path C:\GPO_Backups -Comment "This is the regular nightly backup of all GPOs"

Cool! You can even add comments to the backup jobs! After allowing this command to run, if we take a look inside C:\GPO_Backups we will see many folders with crazy names. Backing up GPOs via PowerShell accomplishes the same thing that it does via GPMC – where each GPO backup will be stored using a unique, random GUID so that you can back up time and time again into this same folder, and the backups will never step on each ...

Get Mastering Windows Group Policy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.