Reputation: 95
I have figured out how to add active directory groups to a user using the following command
Add-ADGroupMember -Identity "Group Name" -Members "UserName"
Is there a way to add multiple groups to a user or multiple users to a group? I have tried comma separating the users and groups but it doesn't seem to work.
Upvotes: 1
Views: 61
Reputation: 1020
get-aduser username | Add-ADPrincipalGroupMembership -MemberOf "group1","group2"
Upvotes: 2