How can I add members to a new distribution group from a CSV file?I'd like to import users from a CSV file to a Distribution Group. I've exported the members of an exisiting Distribtution Group to the CSV and I basically want to clone it with a different name. I can't get the Powershell to work...<br><br>I thought it should look like<br><br>Import-Csv -Path D:\ml.csv | ForEach-Object {Add-DistributionGroupMember....this is where I'm lost....<hr class="sig">Orange County District Attorney© 2009 Microsoft Corporation. All rights reserved.Mon, 06 Jul 2009 11:24:50 Z11dc55d8-31e1-4797-8fa1-27eb93e55516http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#11dc55d8-31e1-4797-8fa1-27eb93e55516http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#11dc55d8-31e1-4797-8fa1-27eb93e55516Sandy Woodhttp://social.technet.microsoft.com/Profile/en-US/?user=Sandy%20WoodHow can I add members to a new distribution group from a CSV file?I'd like to import users from a CSV file to a Distribution Group. I've exported the members of an exisiting Distribtution Group to the CSV and I basically want to clone it with a different name. I can't get the Powershell to work...<br><br>I thought it should look like<br><br>Import-Csv -Path D:\ml.csv | ForEach-Object {Add-DistributionGroupMember....this is where I'm lost....<hr class="sig">Orange County District AttorneyWed, 18 Mar 2009 17:08:17 Z2009-03-18T17:08:17Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#69f493c9-0012-4e6e-ab29-402a97455594http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#69f493c9-0012-4e6e-ab29-402a97455594Amit Tankhttp://social.technet.microsoft.com/Profile/en-US/?user=Amit%20TankHow can I add members to a new distribution group from a CSV file?<span class=Apple-style-span style="font-size:12px">Hey Sandy,</span><div><span class=Apple-style-span style="font-size:12px"><br></span></div><div><span class=Apple-style-span style="font-size:12px">Try below cmdlet to import from CSV file...<br></span><div><span class=Apple-style-span style="font-size:12px"><br></span></div><div><span class=Apple-style-span style="font-size:11px;line-height:16px"><span class=Apple-style-span style="color:rgb(51, 51, 255)"><span class=Apple-style-span style="font-size:12px">Import-CSV FileName.csv | </span></span></span><span class=Apple-style-span style="font-size:11px;line-height:15px;white-space:pre-wrap"><span class=Apple-style-span style="color:rgb(51, 51, 255)"><span class=Apple-style-span style="font-size:12px">ForEach {Add-DistributionGroupMember -Identity &quot;DG Name&quot; -Member $_.Name}</span></span></span><span class=Apple-style-span style="font-size:12px"><br></span></div><div><span class=Apple-style-span style="font-size:12px"><br></span></div><div><span class=Apple-style-span style="font-size:11px;line-height:15px;white-space:pre-wrap"><span class=Apple-style-span style="font-size:12px">In filename.csv file should have a column Name and the values must be in anyone of below format to add them as a member...</span></span></div><div><span class=Apple-style-span style="font-size:11px;line-height:15px;white-space:pre-wrap"><span class=Apple-style-span style="color:rgb(51, 51, 255)"><span class=Apple-style-span style="font-size:12px">GUID distinguished name UPN LegacyExchangeDN Domain\Account Name SMTP Address<br></span></span></span></div><div><span class=Apple-style-span style="color:rgb(51, 51, 255);line-height:15px;white-space:pre-wrap"><br></span></div><div><span class=Apple-style-span style="color:rgb(51, 51, 255);line-height:15px;white-space:pre-wrap"><span class=Apple-style-span style="color:rgb(0, 0, 0)">Add-DistributionGroupMember</span><br></span></div><div><span class=Apple-style-span style="line-height:15px;white-space:pre-wrap"><a href="http://technet.microsoft.com/en-us/library/bb124340.aspx">http://technet.microsoft.com/en-us/library/bb124340.aspx</a><br></span></div><div><span class=Apple-style-span style="font-size:11px;line-height:15px;white-space:pre-wrap"><br></span></div><div><span class=Apple-style-span style="font-size:11px;line-height:15px;white-space:pre-wrap"><br></span></div></div><hr class="sig">Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.comThu, 19 Mar 2009 03:18:06 Z2009-03-19T03:18:06Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#0cf7c5c7-b405-4f79-a5b0-b05bc97637b8http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#0cf7c5c7-b405-4f79-a5b0-b05bc97637b8James-Luohttp://social.technet.microsoft.com/Profile/en-US/?user=James-LuoHow can I add members to a new distribution group from a CSV file?<font style="font-size:14px"></font> <p style="margin:0in 0in 6pt"><font style="font-size:14px" face=Calibri>Good job, Amit</font></p> <p style="margin:0in 0in 6pt"><font style="font-size:14px" face=Calibri>I tested in the lab</font></p> <p style="margin:0in 0in 6pt"><font style="font-size:14px" face=Calibri>Step 1: Export Value of the user object you want to add into DG (Distribution Group)</font></p> <p style="margin:0in 0in 6pt"><font style="font-size:14px" face=Calibri>Csvde -r objectclass=user -d &quot;OU=ExTeam,DC=contoso,DC=com&quot; -l &quot;Name&quot; -f C:\member.txt</font></p> <p style="margin:0in 0in 6pt"><font style="font-size:14px" face=Calibri>Step 2: Import the file as Amit said</font></p> <p style="margin:0in 0in 6pt"><font style="font-size:14px" face=Calibri>import-csv C:\member.txt | foreach {add-distributiongroupmember <i>DGName</i> -member $_.Name}</font></p> <p style="margin:0in 0in 6pt"><font style="font-size:14px" face=Calibri>Step 3: Verify the result via EMC or EMS</font></p>Thu, 19 Mar 2009 06:48:25 Z2009-03-19T06:48:25Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#b85863ce-f9a9-4c3c-99b9-57d05e7cf324http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#b85863ce-f9a9-4c3c-99b9-57d05e7cf324Sandy Woodhttp://social.technet.microsoft.com/Profile/en-US/?user=Sandy%20WoodHow can I add members to a new distribution group from a CSV file?Thanks again Amit. We gave it a try and it worked perfectly. <hr class="sig">Orange County District AttorneyThu, 19 Mar 2009 14:15:01 Z2009-03-19T14:15:01Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#5121d1fb-1228-4210-8987-4f08f19bb656http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#5121d1fb-1228-4210-8987-4f08f19bb656Amit Tankhttp://social.technet.microsoft.com/Profile/en-US/?user=Amit%20TankHow can I add members to a new distribution group from a CSV file?My pleasure Sandy... :)<hr class="sig">Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.comThu, 19 Mar 2009 14:19:16 Z2009-03-19T14:19:16Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#de8bc4ff-1523-4713-9fbc-bcbf8f1a79a8http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#de8bc4ff-1523-4713-9fbc-bcbf8f1a79a8Andrey Zakharovhttp://social.technet.microsoft.com/Profile/en-US/?user=Andrey%20ZakharovHow can I add members to a new distribution group from a CSV file?Hi Amit,<br/>how can i do this on exchange 2003?<br/>I now that <span style="font-size:small"><span style="font-family:Calibri">add-distributiongroupmember - is exchange 2007 cmdlet and is don't work on 2003.<br/>10x</span></span>Sat, 04 Jul 2009 08:19:31 Z2009-07-04T08:19:31Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#74ce1400-4168-4589-b669-5677fda400a8http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#74ce1400-4168-4589-b669-5677fda400a8Jim McBee - Exchange MVPhttp://social.technet.microsoft.com/Profile/en-US/?user=Jim%20McBee%20-%20Exchange%20MVPHow can I add members to a new distribution group from a CSV file?Exchange Server 2003 does not have this cmdlet or an similar function.  If you want to use PowerShell and you are using Exchange 2003, you could probably use the Quest Active Directory Powershell tools<br/><a href="http://www.quest.com/powershell/activeroles-server.aspx">http://www.quest.com/powershell/activeroles-server.aspx</a><br/><br/>You would need to install the PowerShell and then install the Quest tools. Then take a look at the Add-QADGroupMember cmdlet that Quest provides.<hr class="sig">Jim McBee - Blog - http://mostlyexchange.blogspot.comSat, 04 Jul 2009 23:17:41 Z2009-07-04T23:17:41Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#05cbae06-afd1-465c-b855-d678a02997d0http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#05cbae06-afd1-465c-b855-d678a02997d0Andrey Zakharovhttp://social.technet.microsoft.com/Profile/en-US/?user=Andrey%20ZakharovHow can I add members to a new distribution group from a CSV file?WOW<br/><br/>Jim thx, it work Perfect!!! :)<br/><br/>ThanksSun, 05 Jul 2009 17:03:50 Z2009-07-05T17:03:50Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#5fac5525-8dc9-4ce9-8b22-d1c394debd43http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#5fac5525-8dc9-4ce9-8b22-d1c394debd43Jim McBee - Exchange MVPhttp://social.technet.microsoft.com/Profile/en-US/?user=Jim%20McBee%20-%20Exchange%20MVPHow can I add members to a new distribution group from a CSV file?The Quest tools are great.  I use them on all of my E2K3 servers (that I wish I could migrate to E2K7)  :-)<br/><hr class="sig">Jim McBee - Blog - http://mostlyexchange.blogspot.comSun, 05 Jul 2009 20:39:42 Z2009-07-05T20:39:42Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#979a8bdc-4b3c-476e-b009-314f9d022d50http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/11dc55d8-31e1-4797-8fa1-27eb93e55516#979a8bdc-4b3c-476e-b009-314f9d022d50anil-rockshttp://social.technet.microsoft.com/Profile/en-US/?user=anil-rocksHow can I add members to a new distribution group from a CSV file?<blockquote>Exchange Server 2003 does not have this cmdlet or an similar function.  If you want to use PowerShell and you are using Exchange 2003, you could probably use the Quest Active Directory Powershell tools<br/><a href="http://www.quest.com/powershell/activeroles-server.aspx">http://www.quest.com/powershell/activeroles-server.aspx</a><br/><br/>You would need to install the PowerShell and then install the Quest tools. Then take a look at the Add-QADGroupMember cmdlet that Quest provides. <hr class=sig> Jim McBee - Blog - http://mostlyexchange.blogspot.com</blockquote> <p><br/>Hi Amit,</p> <p>I have 100+ DL's &amp; need to add 15-30Users a memeber of it, can you please let me know how do i achieve this with VB script &amp; a input file as csv</p> <p>The CSV file will be GroupName, DN,GroupType, Memebers (User Sam A/c) with clon seperated.</p> <p>Thanks</p> <p>Rocks</p>Mon, 06 Jul 2009 11:24:49 Z2009-07-06T11:24:49Z