Link to home
Start Free TrialLog in
Avatar of Salonge
Salonge

asked on

Exporting email distribution groups to CSV file

I need several email lists by distribution group.  I am trying to export the groups out of Exchange 2010 into a csv file to be used in another application.  Can someone help with this?  I understand there is something that can be done in Powershell.
Avatar of J0rtIT
J0rtIT
Flag of Venezuela, Bolivarian Republic of image

Yep, on Exchange Powershell run:

Get-DistributionGroup | Export-csv -Notypeinformation "$env:userprofile\desktop\DistributionGroups.csv"

Open in new window


That should work into a CSV file on the desktop of the currently logged user.
Avatar of Salonge
Salonge

ASKER

When I run this script my file is blank.  Shouldn't I have to put the name of the group somewhere in this script?
let me double checked it
Get-DistributionGroup | ConvertTo-Csv -NoTypeInformation | Out-File "$env:userprofile\desktop\Di
stributiongroups.csv"

Open in new window

Avatar of Salonge

ASKER

I am getting the error Get-DistributionGroup is not a recognized name of a cmdlet, function, script file or operable program.
Avatar of Salonge

ASKER

This works to pull out the list of Distribution groups.  I was able to get a CSV of all of my Distribution groups.  Thank you.  But I need that list that I see when I do the Get-DistributionGroupMembers.  I want to be able to convert to a CSV by group.
alright I'd fix the ps code into that
ASKER CERTIFIED SOLUTION
Avatar of J0rtIT
J0rtIT
Flag of Venezuela, Bolivarian Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Salonge

ASKER

Thank you.  I had to do some other steps to connect to Office365, but this ultimately worked just fine.