?
Solved

Excel: Assign names to a group (Distribution List)

Posted on 2013-06-24
2
Medium Priority
?
437 Views
Last Modified: 2013-06-25
Hello All-
I'm stumped with this one.  Environment:
AD 2008R2, Exchange 2010.
I received a list of almost 600 distribution lists from my client. Unfortunately, it was just the names and did not include membership. I used Powershell to create the DLs but now I need to populate them. I have a script that will work, but I'm stumped on how to parse the data and assign users to a DL.
If you take a look at my attachment (capture.jpg), you'll see the DL alias as the first column and the list of DL members to the right. Each member SAMAccountName is separated by a space.
Ideally, I'd like to take each name and put it on its own row (not column) so I can easily create an import file to use with Powershell. I've created a mock-up of what I'm looking for (see After.jpg)
Can this even be done? Or can anyone advise me on a better approach?
Thanks!!
EricData as I received itafter.JPG
0
Comment
Question by:Cymbaline65
[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
2 Comments
 

Author Comment

by:Cymbaline65
ID: 39272718
After giving this some thought, it could be better said that instead of doing "text to columns", I want to do "text to rows." I found a VB Script on the web but it does not work - or at least I could not get it working.
0
 

Accepted Solution

by:
Cymbaline65 earned 0 total points
ID: 39275297
Ended up using powershell, no Excel trickery required:

Import-CSV c:\List.csv | foreach { $dgName = $_.name; Get-DistributionGroup -Name $dgName; $_.members.split(" ") | foreach { Add-DistributionGroupMember -id $dgName -member $_}}
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

A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Suggested Courses

771 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