Link to home
Start Free TrialLog in
Avatar of stubar
stubar

asked on

Trying to remove a user from multiple security groups using VB.NET

Hi
I'm trying to remove a user from multiple security groups using VB.NET. I can do it in vbs but .NET is killing me :o(
I know I have to find the user, enumerate what they have and then loop around each one removing them from the groups but I'm having no joy.
Looked around the web and can't quite put 2 and 2 together.

Would it be possible please for someone to throw together a brief bit of code that will:
1) Find one user in AD
2) List what groups they are in (if any)
3) Remove that user from those groups

I'm using Visual Studio 2008, got all my Imports ect and would appreciate this as I'm running out of time on a project.
Thanks
 Stuart
ASKER CERTIFIED SOLUTION
Avatar of graye
graye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stubar
stubar

ASKER

Apologies for the tardiness.
In the end I went with another option but as this solution fits the bill I am still awarding the points.
Thanks again.

Stuart