Solved

Adding bulk SMTP addresses to distribution group in Exchange

Posted on 2016-08-24
3
30 Views
Last Modified: 2016-08-24
Hi Folks,

I'm trying to bulk add a group of SMTP addresses to a distribution group.  The CSV content is such:

user1@systems.com,user2@systems.com,user3@systems.com

Import-CSV D:\Scripts\Test\dist-list.csv | ForEach {Add-DistributionGroupMember -Identity "ALLKSATestStaff" -Member $_}

Open in new window


When I run this through the Exchange Management Shell, it executes without any errors, but the distribution group is not updated - any ideas?

Thanks in advance
0
Comment
Question by:khanfe
3 Comments
 
LVL 28

Assisted Solution

by:Michael Pfister
Michael Pfister earned 250 total points
ID: 41768741
Import-CSV expects each entry in a seperate line.


i.e.


user1@systems.com
user2@systems.com
user3@systems.com
0
 
LVL 16

Accepted Solution

by:
FOX earned 250 total points
ID: 41768748
name the header that contains your email addresses Alias
Import-CSV "D:\Scripts\Test\dist-list.csv" | ForEach {Add-DistributionGroupMember -Identity "ALLKSATestStaff" -Member $_.Alias}
0
 

Author Comment

by:khanfe
ID: 41768761
Thanks folks - Both your suggestions worked for the different issues - it's now working!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now