A script to list all attributes listed in the Active Directory Schema which have been set to replicate into the Global Catalog.

Inclusion in the Global Catalog is defined by setting the attribute "isMemberOfPartialAttributeSet" to True.

Set objRootDSE = GetObject("LDAP://RootDSE")
Set objSchema = GetObject("LDAP://" & objRootDSE.Get("schemaNamingContext"))
objSchema.Filter = Array("attributeSchema")
For Each objAttribute in objSchema
    On Error Resume Next
    booIsAttribute = False
    booIsAttribute = objAttribute.Get("isMemberOfPartialAttributeSet")
    On Error Goto 0
    
    If booIsAttribute = True Then
        WScript.Echo objAttribute.Get("lDAPDisplayName")
    End If
Next