Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

dynamic distribution group memebers

Posted on 2016-11-09
10
Medium Priority
?
66 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
[X]
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
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 16

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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

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 16

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 16

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 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
0

Featured Post

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

Question has a verified solution.

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

New style of hardware planning for Microsoft Exchange server.
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
In this video we show how to create a Shared Mailbox 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 Recipients >> Sha…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

715 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