
|
email this FAQ to a colleague
Q:
How do I view all the group in the domain using ADSI?
A:
Here is some code that uses ADSI to display all the groups in a domain:
strDomain="DOMAINNAME"
Set oDomain = GetObject("WinNT://" & strDomain)
oDomain.Filter = Array( "group")
For Each oGroup In oDomain
If oGroup.Class = "Group" Then
Response.Write(oGroup.Name & "<BR>")
End If
Next
oDomain=Nothing
oGroup=Nothing
- Wayne Berry
|