Found the below on the xhb newsgroup, but can't seem to translate the Getobject call. Does anybody know of an alternative way to get domain info, not necessarily AD, could be Linux+Samba too.
- Code: Select all Expand view RUN
Function VerifyGroupMembers( strDomain, strGroup, strMemberList )
VerifyGroupMembers = False
Set objGroup = GetObject("WinNT://" & strDomain & "/" & strGroup &
",group")
arrUsers = Split( strMemberList, "," )
For Each objUser In objGroup.Members
WScript.Echo "Checkiing group member " & objUser.Name
bMemberFound = False
For i = 0 To UBound( arrUsers )
If( UCase( Trim( arrUsers(i) ) ) = UCase( Trim( objUser.Name ) ) )
Then
WScript.Echo "Member found: " & objUser.Name
bMemberFound = True
Exit For
End If
Next
If( Not bMemberFound ) Then
WScript.Echo "Member NOT found: " & objUser.Name
VerifyGroupMembers = False
Exit Function
End If
Next
VerifyGroupMembers = True
End Function