Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List the Attributes of the organizationalUnit ClassContent of List the Attributes of the organizationalUnit Class.vbsMD5 Hash: DDC4FCAD11F6F7FFED3954BC4993A121 |
||
' Description: Returns both the mandatory and optional attributes for the organizationalUnit class (as found in the Active Directory schema).
Set objOrganizationalUnitClass = _ GetObject("LDAP://schema/organizationalUnit") Set objSchemaClass = GetObject(objOrganizationalUnitClass.Parent) i = 0 WScript.Echo "Mandatory attributes:" For Each strAttribute in objOrganizationalUnitClass.MandatoryProperties i= i + 1 WScript.Echo i & vbTab & strAttribute Set objAttribute = objSchemaClass.GetObject("Property", strAttribute) WScript.Echo " (Syntax: " & objAttribute.Syntax & ")" If objAttribute.MultiValued Then WScript.Echo " Multivalued" Else WScript.Echo " Single-valued" End If Next WScript.Echo VbCrLf & "Optional attributes:" For Each strAttribute in objOrganizationalUnitClass.OptionalProperties i= i + 1 WScript.StdOut.Write i & vbTab & strAttribute Set objAttribute = objSchemaClass.GetObject("Property", strAttribute) Wscript.Echo " [Syntax: " & objAttribute.Syntax & "]" If objAttribute.MultiValued Then WScript.Echo " Multivalued" Else WScript.Echo " Single-valued" End If Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |