Is there a way to schedule the GPO backup process that can be performed manually in the GPMC?

Folks -

In the GPMC, if one right-clicks on "Group Policy Objects" and chooses "Back Up All...", a complete backup of all GPOs will be done to a single destination directory.  If you run this over and over, cumulative backups are stored and an admin can choose to rollback to specific times and dates for any individual GPO.

That said, does anyone know how to schedule this specific process via Powershell or otherwise?  I'm not interested in a script that simply copies SYSVOL to a folder, I know how to do that.  What I'm looking for is the ability to trigger the process that is within GPMC via automated means.  That way I get version history and the ability to roll back to a point in time backup more easily than if I just copied SYSVOL in its entirety.

Who is Participating?
AnuroopsunddConnect With a Mentor Commented:
Yes their is commandlet which can be used through powershell

Backs up one GPO 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>]

for complete list of gpo cmdlets
Joseph MoodyBlogger and wearer of all hats.Commented:
Look into Advance Group Policy Management. It automatically backs up your GPOs (after every change). You can then revert back to any previous GPO (as well as restore deleted GPOs).
Mike KlineCommented:
There are also scripts that come with GPMC that you can use

download them here for the 2008 box  (not sure why they are not included in 2008)

BackupAllGPOs.wsf  might be what you are after


amendalaAuthor Commented:
Just playing around I've discovered that it's insanely easy.  All you need is a destination directory already created.  Then use the following CMDLet syntax to backup all GPOs:

Backup-GPO -All -Path "C:\GPOBackups"

You'll need both the "ActiveDirectory" and "GroupPolicy" modules imported for this to work.  This not only backs up all the GPOs but does so in the same fashion the GPMC does so version history is retained.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.