PowerTip: Add User to Group in Active Directory with PowerShell

Summary: Use Windows PowerShell to add a user to a security group in Active Directory.

Hey, Scripting Guy! Question How can I use Windows PowerShell to add a user to a security group in Active Directory?

Hey, Scripting Guy! Answer In Windows Server 2012 R2 or Windows Server 2008 R2, use the Add-ADGroupMember cmdlet.

To add a user with a SAM ID “John.Smith” to a security group called “Finance”:

ADD-ADGroupMember “Finance” –members “John.Smith”

Comments (7)

  1. Chen V says:

    To add two or three members to group


    Identity: Finance

    Members[0]: ChendrayanVenkatesan

    Members[1]: ChenV

    Members[2]: PowerShell

  2. Jinane says:

    What about if I want to add all members into one group ? or members in an OU into one group?

  3. Kyle says:


    How would you acheive adding a user from domain A to a group that is in domain B via powershell without the Quest cmdlets? I’ve been trying to figure this out for about a week now. Please let me know if the scripting guy has seen this issue before.

    Thank you,

  4. curtiss says:

    got it. now how do I grant john.smith permission to add members to the Finance group?

  5. pregunton says:

    What’s about
    http://trevorsullivan.net/2014/07/24/powershell-add-users-to-active-directory-group-from-text-file/#comment-86408 ?

    And with another domain (Server parameter) ?

    Get user from a csv file ?

  6. Steve Striedinger says:

    How do you add multiple groups ?

Skip to main content