View Blog

Jul 2009
13

Team:

Last week, we talked about backing up your GPOs, and how you should be, ya know, "just doing it."

Then I got some emails asking me about "automating that backup."

Turns out.. that's easy too! Here's two ways (I'm sure there are more.)

Way #1: VB-scripts via the GPMC scripts
The older GPMC had built-in scripts. The newer GPMCs require that you download the sample scripts. These are great and super helpful and can be found here: http://tinyurl.com/gpscripts

You can see examples of using the scripts if you head over here:
http://msdn.microsoft.com/en-us/library/aa814151(VS.85).aspx

The script you want to play with is called "BackupAllGPOs.vbs."

It's easy as pie. Or punch. Or something that's easy.

Way #2: If you're a Powershell geek / geekette
The newest GPMC with Win7 and WS08/R2 supports lots of SIMILAR constructs (create GPOs, backup, restore, etc), but now you can ALSO use PowerShell. So, to "get" the GP-related commands into Powershell, I typed

"Import-Module grouppolicy -verbose"

then I was able to run this quick command

"backup-gpo -all -path c:SavedGPOs"

And, blammo. Instant backup of my GP-world.

There's more to the command, of course; but that's its simplest use.

Again, easy as falling off a log... if you know the secrets.



Comments (0)

No Comments!