need assistance creating and populating multiple distribution groups in office 365

can someone provide a powershell script that we can use to create 100+ distribution groups in our cloud based office 365 account [not hybrid] and populate membership.

our input file is:
column a                column b
usera                       group1
userb                       group1
userc                        group 1
usera                       group2
userb                       group2
userc                       group2


many thanks,

S.
siber1Asked:
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.

SubsunCommented:
Add-DistributionGroupMember should work for exchange online as well...
Import-csv C:\user.csv | % {Add-DistributionGroupMember $_.Group -Member $_.Member}

Open in new window

Input csv format..
Member,Group
UserA@Domain.com,GroupA
UserB@Domain.com,GroupA

Open in new window

0

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
siber1Author Commented:
thx Subsun. I will test that with our exchange online account shortly.
0
siber1Author Commented:
thanks Subsun. worked great!
0
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
Powershell

From novice to tech pro — start learning today.