September 2003
Intermediate to advanced
624 pages
15h 49m
English
You want to back up a GPO.
Open the GPMC snap-in.
In the left pane, expand the Forest container, expand the Domains container, browse to the domain of the GPO you want to back up, and expand the Group Policy Objects container.
Right-click on the GPO you want to back up, and select Back Up.
For Location, enter the folder path to store the backup files.
For Description, enter a descriptive name for the backup.
Click the Back Up button.
You will see a progress bar and status message that indicates if the back up was successful.
Click OK to exit.
> backupgpo.wsf "<GPOName>" "<BackupFolder>" /comment:"<BackupComment>"
' This code backs up a GPO to the specified backup location. ' ------ SCRIPT CONFIGURATION ------ strGPO = "<GPOName>" ' e.g. Default Domain Policy strDomain = "<DomainDNSName>" ' e.g. rallencorp.com strLocation = "<BackupFolder>" ' e.g. c:\GPMC Backups strComment = "<BackupComment>" ' e.g. Default Domain Policy Weekly ' ------ END CONFIGURATION --------- set objGPM = CreateObject("GPMgmt.GPM") set objGPMConstants = objGPM.GetConstants( ) ' Initialize the Domain object set objGPMDomain = objGPM.GetDomain(strDomain, "", objGPMConstants.UseAnyDC) ' Find the GPO you want to back up set objGPMSearchCriteria = objGPM.CreateSearchCriteria objGPMSearchCriteria.Add objGPMConstants.SearchPropertyGPODisplayName, _ objGPMConstants.SearchOpEquals, cstr(strGPO) set objGPOList = ...