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

x
?
Solved

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

Posted on 2013-12-12
2
Medium Priority
?
590 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
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…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

649 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