-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
attribution group class.vbs
32 lines (28 loc) · 1.16 KB
/
attribution group class.vbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
' List the Attributes of the Group Class
Set objGroupClass = GetObject("LDAP://schema/group")
Set objSchemaClass = GetObject(objGroupClass.Parent)
i = 0
WScript.Echo "Mandatory attributes:"
For Each strAttribute in objGroupClass.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 objGroupClass.OptionalProperties
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