dynamic distribution group memebers

Posted on 2016-11-09
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!!!!!
Question by:yogesh mehta
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
LVL 10

Assisted Solution

by:Muhammad Mulla
Muhammad Mulla earned 250 total points
ID: 41880423

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

LVL 16

Accepted Solution

Todd Nelson earned 250 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


Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.


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
LVL 16

Expert Comment

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

Author Comment

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

Expert Comment

by:Todd Nelson
ID: 41881628


Should be this...


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

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.
LVL 16

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

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses
Course of the Month7 days, 5 hours left to enroll

623 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