Solved

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

Posted on 2013-12-12
2
577 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
A brief introduction to what I consider to be the best editor for PowerShell.
In this video we show how to create a mailbox database 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 Servers >> Data…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

772 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