Active Directory

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
 
E

Ed Wyche

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.
 
C

Clive Lumb

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.
 
E

Ed Wyche

Is there any sample code to search for a group and empty it and then
repopulate it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top