To enumerate users of a groups I use this. It not especially elegant, i
know, but works a treat.
Sub NewLoadADUsers(ByVal strDomain, ByVal strGroup)
Dim UserGroup
Dim UserAccount
UserGroup = GetObject("WinNT://" & strDomain & "/" & strGroup) ' &
",group")
For Each UserAccount In UserGroup.Members
Debug.WriteLine(UserAccount.Name)
Next
End Sub
There are plenty of other properties you can use instead of
UserAccount.Name, for example, UserAccount.ProfilePath. You will need to
read MSDN to find out what they are.
--
Bob
--------------------------------------
I'll have a B please Bob.
"Garrett" <ag*******@hotmail.com> wrote in message
news:3a**************************@posting.google.c om...
Hi all,
I am looking for a sample of System.DirectoryServices code that will
allow me to do three things:
1. Iterate over all shared folders on a drive
2. Find the groups that are assigned to each folder
3. Find each user of each group found in step two
Thanks
A