[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Add smtp address to distribution list

Posted on 2014-03-18
3
Medium Priority
?
5,988 Views
Last Modified: 2014-03-19
Please help as I have a list of SMTP addresses and trying to add them to the distribution list by displayname. I have a input csv file with the following format.

Displayname    smtpaddress
finance              finance_east@contoso.local
finance              finance_newyork@contoso.local
accounting       acct_east@contoso.local
accounting       acct_newyork.local

here is what I have been playing around with but still does not work please help.

Import-CSV C:\temp\emailbook.csv | % {
Set-distributiongroup $_.displayname -EmailAddresses SMTP:$_.email
}
0
Comment
Question by:techdrive
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
pr0t0c0l12 earned 2000 total points
ID: 39936933
try using this:
Set-distributiongroup $_.displayname -EmailAddresses @{add=$_.email}

Open in new window

and this if you have multiple:
Set-distributiongroup $_.displayname -EmailAddresses @{add=$_.email,$_.email2}

Open in new window

0
 

Author Comment

by:techdrive
ID: 39937051
thanks Pr0t0c0112 but does this work calling this from a file like I have above.
0
 

Author Comment

by:techdrive
ID: 39940280
got it thanks for your help I really appreciate your help.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses

656 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