A. The following script, which you can download at http://www.windowsitpro.com/articles/download/listguid.zip , takes the distinguished name (DN) of a domain and returns a list of globally unique identifiers (GUIDs) that it uses to display the GPO names.
' Check that all arguments required have been passed. If Wscript.Arguments.CountHere's a sample execution and output: D:\Temp>cscript listgpo.vbs dc=savilltech,dc=com
GUID: \{31B2F340-016D-11D2-945F-00C04FB984F9\} Name: Default Domain Policy
GUID: \{6AC1786C-016F-11D2-945F-00C04fB984F9\} Name: Default Domain Controllers Policy
GUID: \{A9AB07C1-5EAA-4E60-9507-F33524933E7A\} Name: Restrict Account Rights
GUID: \{CE948635-2E6E-4AAB-8F46-5CA7581528AF\} Name: Remove Service Account Rights
GUID: \{01D59D61-5417-45A7-96B3-9F694CC686C0\} Name: Auto Enrollment
GUID: \{BA7E1B25-7341-471E-8FEC-17B9E761DB35\} Name: Autoenrollment