September 2003
Intermediate to advanced
624 pages
15h 49m
English
You want to list all of the links for a particular GPO.
Open the GPMC snap-in.
In the left pane, expand the Forest container, expand the Domains container, browse to the domain of the target GPO, and expand the Group Policy Objects container.
Click on the GPO you want to view the links for.
In the right pane, the defined links for the GPO will be listed under Links.
> dumpgpoinfo.wsf "<GPOName>"' This code lists all the sites, OUs, and domains a GPO is linked to. ' ------ SCRIPT CONFIGURATION ------ strGPO = "<GPOName>" ' e.g. SalesGPO strForest = "<ForestName>" ' e.g. rallencorp.com 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) ' Initialize the Sites Container object set objGPMSitesContainer = objGPM.GetSitesContainer(strForest, _ strDomain, "", objGPMConstants.UseAnyDC) ' Find the specified GPO set objGPMSearchCriteria = objGPM.CreateSearchCriteria objGPMSearchCriteria.Add objGPMConstants.SearchPropertyGPODisplayName, _ objGPMConstants.SearchOpEquals, cstr(strGPO) set objGPOList = objGPMDomain.SearchGPOs(objGPMSearchCriteria) if objGPOList.Count = 0 then WScript.Echo "Did not find GPO: " & strGPO WScript.Echo "Exiting." WScript.Quit ...