Solved

Query Excahnge Dynamic Dist list and export to a test

Posted on 2011-03-03
4
791 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
To show how to create a transport rule 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 >> Rules tab.:  To cr…

707 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

16 Experts available now in Live!

Get 1:1 Help Now