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/
Leave a Reply