Solved

dynamic distribution group memebers

Posted on 2016-11-09
10
42 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 19

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 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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
 

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
This article explains how to install and use the NTBackup utility that comes with Windows Server.
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

772 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