Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! Can I Use Windows PowerShell to Manage AD DS Security Groups?

 Hey, Scripting Guy! I am a MCSE and I still remember my instructor at the training center running around the room shouting, “Users go into groups, and groups get assigned rights and permissions.” Over and over again in different manners and in different language, but always with the same intent, he kept repeating the same ...

Hey, Scripting Guy! How Can I Add a User to Multiple Groups?

Hey Scripting Guy! It seems that I can never find what I need anymore. I am looking for a Windows PowerShell script that will add a user to multiple groups. The user and the group are in the same organizational unit, and I do not want to have to run the same script multiple times to add a user to multiple groups. It should be easy to do, right...

Hey, Scripting Guy! How Do I Remove All Group Members in Active Directory?

Hey Scripting Guy! I have several groups created in Active Directory whose membership has changed dramatically. Rather than go through a long list of users and try to manually clean up the list, I would like to just delete all the users from the group so that I can later add the newly approved members to the group. I have checked around, and ...