Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Verify Whether Attributes are Indexed and-or in the Global CatalogContent of Verify Whether Attributes are Indexed and-or in the Global Catalog.vbsMD5 Hash: CDA6AAABF43D5B1B6D131F0F96B0EBC7 |
||
' Description: Determines which Active Directory attributes are indexed and which attributes are in the global catalog.
Const IS_INDEXED = 1 Set objConnection = CreateObject("ADODB.Connection") objConnection.Open "Provider=ADsDSOObject;" Set objCommand = CreateObject("ADODB.Command") objCommand.ActiveConnection = objConnection objCommand.Properties("Sort On") = "isMemberOfPartialAttributeSet" objCommand.CommandText = _ " "(objectClass=attributeSchema);" & _ "lDAPDisplayName, isMemberOfPartialAttributeSet,searchFlags;onelevel" Set objRecordSet = objCommand.Execute Do Until objRecordSet.EOF WScript.Echo objRecordset.Fields("lDAPDisplayName") If objRecordset.Fields("isMemberOfPartialAttributeSet")Then WScript.Echo "In the global catalog." Else WScript.Echo "Not in the global catlog." End If If IS_INDEXED AND objRecordset.Fields("searchFlags") Then WScript.Echo "Is indexed." Else WScript.Echo "Is not indexed." End If Wscript.Echo VbCrLf objRecordSet.MoveNext Loop objConnection.Close | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |