Returns a list of mandatory and optional attributes for the User class in Active Directory.
Set objUserClass = GetObject("LDAP://schema/user")Set objSchemaClass = GetObject(objUserClass.Parent)i = 0WScript.Echo "Mandatory attributes:"For Each strAttribute in objUserClass.MandatoryPropertiesi= i + 1WScript.StdOut.Write i & vbTab & strAttributeSet objAttribute = objSchemaClass.GetObject("Property", strAttribute)WScript.StdOut.Write " (Syntax: " & objAttribute.Syntax & ")"If objAttribute.MultiValued ThenWScript.Echo " Multivalued"ElseWScript.Echo " Single-valued"End IfNextWScript.Echo VbCrLf & "Optional attributes:"For Each strAttribute in objUserClass.OptionalPropertiesi=i + 1WScript.StdOut.Write i & vbTab & strAttributeSet objAttribute = objSchemaClass.GetObject("Property", strAttribute)WScript.StdOut.Write " [Syntax: " & objAttribute.Syntax & "]"If objAttribute.MultiValued ThenWScript.Echo " Multivalued"ElseWScript.Echo " Single-valued"End IfNext
This is a VB Script, this can be used by saving the file in .vbs file