Solved

Query Excahnge Dynamic Dist list and export to a test

Posted on 2011-03-03
4
793 Views
Last Modified: 2012-05-11
I have Exchange 2010 SP1 and it appears that I need to run this to query a dyn dist list for members

$group = get-DynamicDistributionGroup -identity "AJ.All.Staff"
Get-Recipient -LdapRecipientPreviewFilter $group.RecipientFilter

The 2nd line needs -LdapRecipientPreviewFilter apparently rather than –RecipientPreviewFilter (which works with 2007)

But it will not work.  Please help me
0
Comment
Question by:stowyo
  • 2
  • 2
4 Comments
 
LVL 49

Expert Comment

by:Akhater
ID: 35032115
$group = get-DynamicDistributionGroup -identity "AJ.All.Staff"
Get-Recipient -RecipientPreviewFilter $group.RecipientFilter

works just fine as it is
0
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
ID: 35032134
for a more accurate result you should use

Get-Recipient -RecipientPreviewFilter $group.RecipientFilter -OrganizationalUnit $Group.RecipientContainer
0
 
LVL 1

Author Comment

by:stowyo
ID: 35033042
I tried this and it did not work...
Get-Recipient -RecipientPreviewFilter $group.RecipientFilter -OrganizationalUnit "ou=BA, ou=Europe, dc=mycompany, dc=com" $Group.RecipientContainer

I cannot figure out the way to put in the OU.  

Also, will this show the hidden mailboxes?  I do not want to show those..
0
 
LVL 1

Author Comment

by:stowyo
ID: 35033208
Sorry, I just figured it out.  The OU had an incorrect domain name which threw me off for a while, but I found out that I do not need to specify an OU.  Here is the complete command for future geeks looking to figure out how to do this...

$group = get-DynamicDistributionGroup -identity "AJ.All.Staff"

Get-Recipient -RecipientPreviewFilter $group.RecipientFilter -OrganizationalUnit $Group.RecipientContainer

Those above commands should be on two lines.  The second line may wrap on your screen here at experts-exchange but needs to be entered as one command...
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Read this checklist to learn more about the 15 things you should never include in an email signature.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
how to add IIS SMTP to handle application/Scanner relays into office 365.

832 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