Solved

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

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 …

736 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