Solved

Exchange Shell Export Distribution Group Notes

Posted on 2012-03-14
4
1,425 Views
Last Modified: 2012-03-14
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?
0
Comment
Question by:cbitsupport
4 Comments
 
LVL 40

Accepted Solution

by:
Adam Brown earned 500 total points
ID: 37722385
The notes field isn't a part of the Exchange attributes for Distribution groups, unfortunately. You would need to use the Quest Powershell cmdlets or 2008 R2 AD cmdlets to read that attribute.
0
 
LVL 2

Expert Comment

by:SieQ
ID: 37722415
get-group "name" | select notes
0
 

Author Comment

by:cbitsupport
ID: 37722665
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.
0
 
LVL 1

Expert Comment

by:Ninjade
ID: 37722705
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)
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Read this checklist to learn more about the 15 things you should never include in an email signature.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

685 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