September 2003
Intermediate to advanced
624 pages
15h 49m
English
You want to copy the properties and settings of a GPO to another GPO.
Open the GPMC snap-in.
In the left pane, expand the Forest container, expand the Domains container, browse to the domain of the source GPO, and expand the Group Policy Objects container.
Right-click on the source GPO and select Copy.
Right-click on the Group Policy Objects container and select Paste.
Select whether you want to use the default permissions or preserve the existing permissions, and click OK.
A status window will pop up that will indicate whether the copy was successful. Click OK to close.
Rename the new GPO by right-clicking it in the left pane and selecting Rename.
> copygpo.wsf <SourceGPOName> <TargetGPOName>
' This code copies a source GPO to a new GPO ' ------ SCRIPT CONFIGURATION ------ strSourceGPO = "<SourceGPOName>" ' e.g. SalesGPO strNewGPO = "<NewGPOName>" ' e.g. Marketing GPO strDomain = "<DomainDNSName>" ' e.g. rallencorp.com ' ------ END CONFIGURATION --------- set objGPM = CreateObject("GPMgmt.GPM") set objGPMConstants = objGPM.GetConstants( ) ' Initialize the Domain object set objGPMDomain = objGPM.GetDomain(strDomain, "", objGPMConstants.UseAnyDC) ' Find the source GPO set objGPMSearchCriteria = objGPM.CreateSearchCriteria objGPMSearchCriteria.Add objGPMConstants.SearchPropertyGPODisplayName, _ objGPMConstants.SearchOpEquals, cstr(strSourceGPO) set objGPOList = objGPMDomain.SearchGPOs(objGPMSearchCriteria) ...