I needed to add users to groups by PowerShell and was having trouble finding examples how to do it. Here is how I figured it out.
First, you need a CSV of the users's logon names. My list came from the CSV from:
Get-DistributionGroupMember -Identity 'Some List' | Export-Csv 'list.csv'
The list generated above consisted of alot of fields. The only one I am interested in for this use is "Alias". Once I had the list generated from my old AD, I then ran:
Import-Csv 'list.csv' | ForEach-Object { Add-ADGroupMember -Identity "Some New Group Name" -Members $_.Alias }
Remember the script above needs to be a single line. I had to break it apart so it will fit in the blog format. It worked like a charm.