Avatar of cbitsupport
cbitsupport
 asked on

Exchange Shell Export Distribution Group Notes

Hello,

Exchange 2010 on 2003 domain

I would like to export a list of all my distribution groups with the name, Email address, and notes.  Name and Email address was easy, but notes... that's where I'm stuck.  Looking in AD, open a universal distribution group, General tab, at the bottom of the window there is a notes area.  I want to dump that information.  I have looked at the setting for Set-DistributionGroup thinking it would give me the object name, but no such luck.

Set Ref: http://technet.microsoft.com/EN-US/library/e3a8c709-770a-4900-9a57-adcf0d98ff68(EXCHG.141).aspx

My current PS line is:
Get-DistributionGroup | Select-Object name,primarysmtpaddress | Export CSV C:\DG.csv

and it works nicely, but what is the notes area called?
Exchange

Avatar of undefined
Last Comment
Ninjade

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Adam Brown

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SieQ

get-group "name" | select notes
cbitsupport

ASKER
get-qadgroup -sizelimit 6000 | Select notes,name,primarysmtpaddress | Export-CSV
C:\DG.csv

Was my final command.  Thanks to you both for direction and quick responce.  get-group wasn't correct and with no other informaiton, I have to give points to acbrown.
Ninjade

The solution above is somewhat misleading - you do NOT need to use Quest.  Or any 3rd party tools.  You just need to call different PowerShell commands.

This is possible (easily) in native PowerShell.

Something useful for you here is the | fl command.

Choose a group, and run the following command in PowerShell

Get-DistributionGroup GroupName | fl

This will output a list of all fields that you can directly call with get-distribution group.

Now repeat with

Get-Group GroupName | fl

You will see a list of fields that you can call directly with get-group

NAME and PRIMARYSMTPADDRESS can only be pulled directly with Get-DistributionGroup
NOTES can only be pulled directly with Get-Group

SO

You need to merge these two commands

Get-DistributionGroup YourGroupName | Select-Object name, PrimarySMTPaddress,
    @{n="Notes";e={(Get-Group $_).Notes}}

Open in new window


This will output the data from the 2 commands in one line.

To run it against ALL groups, take out "YourGroupName" and replace with "-ResultSize Unlimited" OR enter a selection criteria if you want to filter (e.g. -Filter "Name -like 'BR*'" to find all lists staring with BR)
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy