Retrieve ALL users from the NT user group

GornHorse

Well-known member
Joined
May 27, 2003
Messages
105
Location
Australia
Hi There,

Just wondering if anyone has any idea how to do this...

I want to fill a drop down with ALL of the users (not user groups) from the NT users list.

Is this possible? I know how to retrieve the current user logged on, and i know how to check if that user is a member of a particular user group, but, I have no idea how to retrieve a list of all the users that are NT users.

If you have any ideas for me, Id be much appreciated. Please, if you can, provide some assistance in VB.NET.


A quick response would be helpful too :)

Regards,
Michelle
 
use this code sniplet
Public Function ListGroupMembers(ByVal MachineName As String, ByVal GroupName As String) As String()
Dim i As Integer
Dim arrStr() As String
Dim objGroup, objMember As Object
i = 0
objGroup = GetObject("WinNT://" & MachineName & "/" & GroupName & ",group")
For Each objMember In objGroup.Members
ReDim Preserve arrStr(i)
arrStr(i) = objMember.Name
i += 1
Next
Return arrStr
End Function
returns an array of string containing group memebers
 
Back
Top