How to add all users in an OU to a Security Group using Get-ADUser and Add-ADGroupMember

Get-ADUser -SearchBase ‘OU=DEV,OU=BuitenDienst,OU=Users,OU=Moto,DC=Com’ -Filter * | ForEach-Object {Add-ADGroupMember -Identity ‘GG_SDS_DEV_Caris_ML_PROD’ -Members $_ }

http://oxfordsbsguy.com/2015/03/09/powershell-how-to-add-all-users-in-an-ou-to-a-security-group-using-get-aduser-and-add-adgroupmember/


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *