KB

List all Group Policies and their GUIDs

Note: The GUIDs listed by this script don't seem to match up with the folder names in the SYSVOL share... I'm not sure what this script actually does, or whether it works. When I get some time I will look into it.

Put these lines into notepad and save the file as seepols.vbs:

set RootDSE = GetObject("LDAP://RootDSE")
Domain = RootDSE.get("DefaultNamingContext")
wscript.echo "The domain name is: " & domain & vbCrLf
Set GPCContainer = GetObject("LDAP://cn=Policies,cn=System," & domain)
For Each object in GPCContainer
    wscript.echo "Friendly name: " & object.displayname
    wscript.echo "Container GUID: " & object.guid
    wscript.echo vbCrLf
Next

Then run the script by typing "cscript seepols.vbs" on the command line.