GPO backup
When you take a System state backup of a DC it includes a backup of your SYSVOL with all your GPO’s. If a GPO get corrupted or is accidentally deleted you have to restore the System state to get the policy back. This operation is time consuming.
With the Group Policy Management Consol (GPMC) you can take backups of your GPO’s directly from the consol (and even restore them) which is less time consuming then a System state restore.
Even better are the scripts that follow with the GPMC. With them you can i.e. schedule a regular backup of all GPO’s.
I made a script that dumps the GPO’s to a file share, using some the scripts that followed with the installation of the GPMC.
Download the GPMC here for Win2003.
”””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””
‘ Backup all GPO’s in the domain
‘ author: Rune Sørensen
‘ 14.04.2009 , v.1.0
‘
‘ Save the script as a vbs file and run it once or create a scheduled task
‘ runnning the script.
‘ \\server\share should reflect your servername and sharename
Dim fso, strPath, objShell
‘ Filepath to the share
strPath = “\\server\share\GPO_Backup\*”
Set fso = CreateObject(“Scripting.FileSystemObject”)
Set objShell = CreateObject(“Wscript.Shell”)
‘ Delete the last taken backup
fso.DeleteFile(strPath)
fso.DeleteFolder(strPath)
strExecuteBackup = “cmd /c ” & “cd %programfiles%\gpmc\scripts\ && cscript BackupAllGPOs.wsf \\server\share\GPO_Backup”‘
strQueryBackups = “cmd /c ” & “cd %programfiles%\gpmc\scripts\ && cscript QueryBackupLocation.wsf \\server\share\GPO_Backup > \\server\share\GPO_Backup\BackupLocations.txt”
strCreateReport = “cmd /c ” & “cd %programfiles%\gpmc\scripts\ && cscript GetReportsForAllGPOs.wsf \\server\share\GPO_Backup”
objShell.Run strExecuteBackup
WScript.Sleep (120000)
objShell.Run strQueryBackups
WScript.Sleep (60000)
objShell.Run strCreateReport
Set objShell = nothing
Set fso = nothing
””””””””””””””””””””” EOF ”””””””””””’