|
List all groups of a domain
- listallGroupsofaDomain.vbs
' How do I view all the group in the domain using ADSI?
DomainString = "MYNTDOMAIN"
dim i
i = 1
Set DomainObj = GetObject("WinNT://" & DomainString)
DomainObj.Filter = Array("group")
For Each GroupObj In DomainObj
If GroupObj.Class = "Group" Then
List = GroupObj.Name
wscript.echo i & vbTab & List
i = i + 1
End If
Next
zurück
|
|