By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,326 Members | 881 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,326 IT Pros & Developers. It's quick & easy.

ADSI question

P: n/a
I have an vb.net method where I want to take a comma delimited list of AD
groups , split them into an array and loop through the groups returning all
users who are a member of the groups. I've eliminated most of the code to
show the example below:

For icount = GroupList.GetLowerBound(0) To
GroupList.GetUpperBound(0)

Dim oMembers As DirectoryEntry = New
DirectoryEntry("WinNT://" & GetDomainName() & "/" & GroupList(icount) &
",group", GetDomainName() & "\" & GetAdminUserName(), GetAdminPassword())
Dim MembersCollection As IADsMembers

MembersCollection = oMembers.Invoke("Members")
oMembers.Close()
oMembers.Dispose()
Next

The first time through the loop everything works great, but the second time
through the loop I get "The network path was not found". It doesn't matter
which groups are first - it always works and the second always fails. It
fails on the MembersCollection = oMembers.Invoke("Members") line.

Any ideas why this is happening are appreciated,

Jason MacKenzie

Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.