September 2003
Intermediate to advanced
624 pages
15h 49m
English
You want to restore 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 restore, and select Restore from Backup.
Click Next.
Select the backup folder location and click Next.
Select the backup you want to restore and click Next.
Click Finish.
You will see the restore status window. After it completes, click OK to close the window.
> restoregpo.wsf "<BackupFolder>" "<GPOName>"
' This code restores a GPO from a back up. ' ------ SCRIPT CONFIGURATION ------ strGPO = "<GPOName>" ' e.g. Sales Users GPO strDomain = "<DomainDNSName>" ' e.g. rallencorp.com strLocation = "<BackupFolder>" ' e.g. c:\GPMC Backups strBackupID = "<BackupGUID>" ' e.g. {85CA37AC-0DB3-442B-98E8-537291D26ED3} ' ------ END CONFIGURATION --------- set objGPM = CreateObject("GPMgmt.GPM") set objGPMConstants = objGPM.GetConstants( ) ' Initialize the Domain object set objGPMDomain = objGPM.GetDomain(strDomain, "", objGPMConstants.UseAnyDC) ' Make sure backup location and ID are valid set objGPMBackupDir = objGPM.GetBackupDir(strLocation) set objGPMBackup = objGPMBackupDir.GetBackup(strBackupID) WScript.Echo "Backup found:" WScript.Echo " ID: " & objGPMBackup.ID WScript.Echo " Timestamp: " & objGPMBackup.TimeStamp WScript.Echo " GPO ...