Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

dynamic distribution group memebers

Posted on 2016-11-09
10
Medium Priority
?
70 Views
Last Modified: 2016-11-10
Team- please help me

i need to extract users mapped to one of the dynamic distribution group, i need to extract the same in excel.

please help!!!!!
0
Comment
Question by:yogesh mehta
10 Comments
 
LVL 20

Expert Comment

by:Peter Hutchison
ID: 41880367
You can use the LDIFDE.exe or CSVDE.exe tools to duplicate the filter string or conditions used in the Dynamic Distribution group to extract the users.

What fields and/or values are the filter in the groups?

e.g. Get all users in AD whose Company field matches 'myCompany' and export Account and Display name fields.
CSVDE -r "(&(objectClass=user)(company=myCompany))" -f output.txt -l samAccountName,DisplayName
0
 
LVL 10

Assisted Solution

by:Muhammad Mulla
Muhammad Mulla earned 1000 total points
ID: 41880423
Hi

If you 're using the active directory module in powershell, you could do something like this:

Get-ADGroupMember -identity "Your group name"| Select-Object Name | Export-CSV C:\temp\groupmembers.csv

Open in new window

0
 
LVL 17

Accepted Solution

by:
Todd Nelson earned 1000 total points
ID: 41881087
The following two commands should get you what you need.  Run them from the Exchange Management Shell.

$DDGMembers = Get-DynamicDistributionGroup "DDGNAME"

Get-Recipient -RecipientPreviewFilter $DDGMembers.RecipientFilter | Select Name,PrimarySmtpAddress,RecipientType | Export-Csv C:\DDGMembers.csv -NoTypeInformation

Open in new window


Reference...

0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

Author Comment

by:yogesh mehta
ID: 41881619
i ran below command

$DDGMembers = Get-DynamicDistributionGroup "rbh"


Get-Recipient -RecipientPreviewFilter $rbhMembers.RecipientFilter | Select Name,PrimarySmtpAddr
ess,RecipientType | Export-Csv C:\Users\ymadmin\Desktop\rbh.csv -NoTypeInformation

but the output file which i am getting is empty
0
 
LVL 17

Expert Comment

by:Todd Nelson
ID: 41881624
Because you have the command wrong.  Review the command I provided again.
0
 

Author Comment

by:yogesh mehta
ID: 41881625
can you please correct it for me i am less exp..
0
 
LVL 17

Expert Comment

by:Todd Nelson
ID: 41881628
This...

$rbhMembers.RecipientFilter

Should be this...

$DDGMembers.RecipientFilter
0
 

Author Comment

by:yogesh mehta
ID: 41881648
i have corrected but still same error please review below command, i am getting blank excel file

Get-Recipient -RecipientPreviewFilter $ddgMembers.RecipientFilter | Select Name,PrimarySmtpAddress,RecipientType | Export-Csv C:\Users\ymadmin\Desktop\rbh.csv –NoTypeInformation
0
 

Author Comment

by:yogesh mehta
ID: 41881713
what i have recognised there is no information is stored in $rbhMembers due to that it is showing blank csv files.
we need to look for some other variable so that it can fetch info.
0
 
LVL 17

Expert Comment

by:Todd Nelson
ID: 41882167
The only changes you need to make to the commands I provided are the items in bold; based on the dynamic distribution group name and the location you want to create the CSV file.

If there is nothing in the CSV file or in the $DDGMembers variable it's most likely because a) that dynamic distribution group doesn't exist (or the name was mistyped); b) you are not running the command in the Exchange Management Shell; or c) you do not have the proper permissions to run the commands.


$DDGMembers = Get-DynamicDistributionGroup "DDGNAME"

Get-Recipient -RecipientPreviewFilter $DDGMembers.RecipientFilter | Select Name,PrimarySmtpAddress,RecipientType | Export-Csv "C:\DDGMembers.csv" -NoTypeInformation
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

972 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