' ------------------------------------------------------------------------- ' From the book Inside Active Directory, ISBN 0-201-61621-1 ' Copyright (C) 2002 by Addison-Wesley ' Script by Sakari Kouti (see http://www.kouti.com) ' You have a royalty-free right to use, modify, reproduce and distribute ' this script (and/or any modified version) in any way you find useful, ' provided that you agree that Addison-Wesley or Sakari Kouti has no ' warranty, obligations or liability for the script. If you modify ' the script, you must retain this copyright notice. ' ------------------------------------------------------------------------- Option Explicit Dim objDSE, i, strName, intGap Dim objPropEntry, varPropValue, objPropValue Set objDSE = GetObject("LDAP://rootDSE") objDSE.GetInfo For i = 0 To objDSE.PropertyCount - 1 Set objPropEntry = objDSE.Item(i) strName = objPropEntry.Name & " (" & objPropEntry.ADsType & ")" For Each objPropValue In objPropEntry.Values varPropValue = _ objPropValue.GetObjectProperty(objPropEntry.ADsType) intGap = 25 - Len(strName) If intGap < 1 Then intGap = 1 WScript.Echo strName & String(intGap, " ") & varPropValue strName = "" Next Next