Add bulk users to Distribution Group using Powershell Cmdlet

I need to add about 100 users to a distribution group in my Exchange 2010 organization. The users are in a csv file. What is the power shell command to use to import these users?

Thanks!!
Anthony K O365Messaging ConsultingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

endital1097Commented:
import-csv c:\users.csv | foreach-object { add-distributiongroupmember <group> -member $_.name }

where name is the column header
Anthony K O365Messaging ConsultingAuthor Commented:
I'm not sure of the columns in my csv file. Would you happen to know the column fields to provide for my csv?
endital1097Commented:
post the header row and i can tell you what to use
Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

Anthony K O365Messaging ConsultingAuthor Commented:
emailaddress  firstname  lastname displayname
endital1097Commented:
import-csv c:\users.csv | foreach-object { add-distributiongroupmember <group> -member $_.emailaddress }

or

import-csv c:\users.csv | foreach-object { add-distributiongroupmember <group> -member $_.displayname }

Anthony K O365Messaging ConsultingAuthor Commented:
Since I'm dealing specifically with Dynamic Distribution Groups, the problem I'm having is the cmdlet is not accepting add-dynamicdistributiongroupMember. Should I not able to substitute this command?
endital1097Commented:
you do not add members to a dynamic distribution group, you create a filter and the membership dynamically changes based on that filter

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Anthony K O365Messaging ConsultingAuthor Commented:
He was absolutely correct. I need to modify the filter

thanks
sarelisCommented:
hello,
any chance to import users from file to distribution group from csv using column number, because my csv file doesnt have headers?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.