Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel: Assign names to a group (Distribution List)

Posted on 2013-06-24
2
Medium Priority
?
444 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

604 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