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?