Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove a Security Group from all Users in a OU

Status
Not open for further replies.

damienenglish

Technical User
Mar 21, 2012
27
0
0
GB
Good Morning

I am putting together a leavers script, and want to remove one particular security group from all users within a leavers OU.

I have found ways of removing all groups from an individual user, but not an individual group from all users in the OU.

Please can anyone help?

Many thanks.
 
Fairly simple to do. First enumerate the users in the OU to create a list of users. Then script the removal of that user from the members list of the Group.

Does that lead you to your answer sufficiently?

I hope that helps.

Regards,

Mark

No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced.

Check out my scripting solutions at
Work SMARTER not HARDER.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top