Solved

Exchange Shell Export Distribution Group Notes

Posted on 2012-03-14
4
1,375 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 38

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
In this video we show how to create an Accepted Domain 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 >> Ac…
This video discusses moving either the default database or any database to a new volume.

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now