Powershell - Add users to groups RRS feed

  • Question

  • Add user name to Users.csv file. Header should be User Name.   Update the group (TestGroup1) with you group name.  


    Import-module ActiveDirectory Import-CSV "C:\Users.csv" | % { Add-ADGroupMember -Identity TestGroup1 -Member $_.UserName } 

    How do i change this so I can have many users end up being placed in multiple groups?

    Can you please explain? I been googling for many hours and I am having a hard time learning this. I feel like I am in a algebra class again...

    • Edited by Whodi Brown Thursday, March 13, 2014 9:38 PM
    Thursday, March 13, 2014 8:18 PM

All replies

  • These are the DPM forums. Please post this in the Active Directory forums here:

    My Blog | |
    If you found this post helpful, please give it a "Helpful" vote. If it answered your question, remember to mark it as an "Answer". This posting is provided "AS IS" with no warranties and confers no rights! Always test ANY suggestion in a test environment before implementing!

    Sunday, March 16, 2014 8:36 PM