Link to home
Start Free TrialLog in
Avatar of s a
s a

asked on

How to get group members of a dynamic distribution list in Exchange 2007?

Hey all, we have a few dynamic distribution groups here and I am trying to extract the users in a particular group, example: ~group-a

Through some research I found a way to do it via exchange shell using the below command...but it doesnt seem to be working for me (getting variable errors)

First I tried:

Get-DistributionGroupMember -identity "~group-a"  | Export-Csv -not c:\list.csv but it told me that the domain name was invalid (I was doing this from an exchange server itself)

Then I tried:
Get-DistributionGroupMember -identity "~group-a" [-ex-server.domain.local] | Export-Csv -not c:\list.csv

and got some parameter errors (domain and distribution group)

any suggestions on what the right command would be? or another way to extract them? again, remember this is a dynamic distribution group (not sure if that makes a diff.)

Thanks
SOLUTION
Avatar of simon2010
simon2010

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sigurdur Haraldsson
Use the Exchange Management Shell:

$RotterdamOffice = Get-DynamicDistributionGroup -Identity “Rotterdam DDG”

Get-Recipient -RecipientPreviewFilter $RotterdamOffice.RecipientFilter (SP1)

Get-Recipient -Filter $RotterdamOffice.RecipientFilter (RTM)

or the Console.

See http://johanveldhuis.nl/?page_id=964&lang=en for further instructions.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial