Solved

need to create a DL and add 50 users as members via powershell

Posted on 2013-12-12
2
575 Views
Last Modified: 2013-12-18
i need to add a Distribution Group in Exchange 2010 and add 50 users to the group via shell..

New-DistributionGroup -Name "group name"

Add-DistributionGroupMember -Identity "group name -Member "test1"

anyway to loop it for the list of users? either via csv or from a form.
0
Comment
Question by:ARM2009
2 Comments
 
LVL 12

Assisted Solution

by:piattnd
piattnd earned 128 total points
ID: 39715476
Yes, there is.

See this blog entry that describes something similar:

http://technet.microsoft.com/en-us/library/ee176843.aspx

Essentially, you have your users in a text file, one per line.  Then in powershell:

Get-Content c:\pathtofile.txt | Foreach-Object {Add-DistributionGroupMember -Identity "group name" -Member &_

Try it with 1 user first.  You may need to add quotes around the &_ which is what pulls in the username for the line it's on.
0
 
LVL 3

Accepted Solution

by:
Exchange_Imran earned 127 total points
ID: 39715703
0

Featured Post

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

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.
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
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…

708 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

10 Experts available now in Live!

Get 1:1 Help Now