?
Solved

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

Posted on 2013-12-12
2
Medium Priority
?
586 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
[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 Comments
 
LVL 12

Assisted Solution

by:piattnd
piattnd earned 384 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 381 total points
ID: 39715703
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 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