Active Directory

  • Thread starter Thread starter Ed Wyche
  • Start date Start date
E

Ed Wyche

I am using VB.Net from Visual Studio 2008.

I would like some code to be able to delete all users from a group. The
groups will be all over AD so I can't specify a OU. Also I would like to
add users to a group and the same thing the groups are all through out AD.
I would appreciate any help that I can get.

Thanks
Ed
 
Also if the group doesn't exist I need it continue or query AD to see if the
group exists before continuing. This is going to be used in a loop.
 
Ed Wyche said:
Also if the group doesn't exist I need it continue or query AD to see if
the group exists before continuing. This is going to be used in a loop.

I do not like to hear the words "Active Directory", "loop" and "delete" in
the same sentence!
Sounds like a recipe for disaster to me.

Take a look in MSDN at the DirectorySearcher.
 
Is there any sample code to search for a group and empty it and then
repopulate it.
 
Back
Top