Solved

dynamic distribution group memebers

Posted on 2016-11-09
10
38 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 18

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 9

Assisted Solution

by:Muhammad Mulla
Muhammad Mulla earned 250 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 14

Accepted Solution

by:
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


Reference...

0
 

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 14

Expert Comment

by:Todd Nelson
ID: 41881624
Because you have the command wrong.  Review the command I provided again.
0
Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

 

Author Comment

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

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 14

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
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…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

758 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

18 Experts available now in Live!

Get 1:1 Help Now