yogesh mehta
asked on
dynamic distribution group memebers
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!!!!!
i need to extract users mapped to one of the dynamic distribution group, i need to extract the same in excel.
please help!!!!!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i ran below command
$DDGMembers = Get-DynamicDistributionGro up "rbh"
Get-Recipient -RecipientPreviewFilter $rbhMembers.RecipientFilte r | Select Name,PrimarySmtpAddr
ess,RecipientType | Export-Csv C:\Users\ymadmin\Desktop\r bh.csv -NoTypeInformation
but the output file which i am getting is empty
$DDGMembers = Get-DynamicDistributionGro
Get-Recipient -RecipientPreviewFilter $rbhMembers.RecipientFilte
ess,RecipientType | Export-Csv C:\Users\ymadmin\Desktop\r
but the output file which i am getting is empty
Because you have the command wrong. Review the command I provided again.
ASKER
can you please correct it for me i am less exp..
This...
$rbhMembers.RecipientFilte r
Should be this...
$DDGMembers.RecipientFilte r
$rbhMembers.RecipientFilte
Should be this...
$DDGMembers.RecipientFilte
ASKER
i have corrected but still same error please review below command, i am getting blank excel file
Get-Recipient -RecipientPreviewFilter $ddgMembers.RecipientFilte r | Select Name,PrimarySmtpAddress,Re cipientTyp e | Export-Csv C:\Users\ymadmin\Desktop\r bh.csv –NoTypeInformation
Get-Recipient -RecipientPreviewFilter $ddgMembers.RecipientFilte
ASKER
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.
we need to look for some other variable so that it can fetch info.
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-DynamicDistributionGro up "DDGNAME"
Get-Recipient -RecipientPreviewFilter $DDGMembers.RecipientFilte r | Select Name,PrimarySmtpAddress,Re cipientTyp e | Export-Csv "C:\DDGMembers.csv" -NoTypeInformation
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-DynamicDistributionGro
Get-Recipient -RecipientPreviewFilter $DDGMembers.RecipientFilte
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)(comp