List_GPMC_Information.wsf (In the book)

Jan
25
2013

 

<job>
<comment>
Script : List_GPMC_Information.wsf
From the book "Group Policy" by Jeremy Moskowitz

The contents of this script are provided "as is".  
No warranty of any kind, either express or implied, is made in relation 
to the availability, accuracy, reliability or content of this script.
ALWAYS test scripts before using in your production network!
</comment>
<script language="VBScript" src="GPMgmt.vbs" />
<script>
CheckCScript
CreateGPMObjects

WScript.Echo "Here's a little information from the GPMDomain object:"
With gpmDomain
	WScript.Echo "This script uses " & .DomainController _
		& " in the " & .Domain & " domain to obtain its GPO settings."
End With 
WScript.Echo vbNL

Set gpmSitesContainer = gpm.GetSitesContainer(dnsForestRoot,"","",0)

WScript.Echo "Here's a little information from the GPMSitesContainer object:"
With gpmSitesContainer
	WScript.Echo "The forest root domain is " & .forest & "."
	WScript.Echo "This script obtains site settings from " & .DomainController _
		& " in the " & .Domain & " domain."
End With
</script>
</job>
Copyright © GPanswers.com. All rights reserved. GPanswers.com is a service of PolicyPak Software