problems with exchange 2010 shell

im trying to run a simple script to get a list of members in a exchange dynamic distribution group
im using rthe following code

Get-DistributionGroupMember -identity “group name” | Export-CSV C:\MyFile.Csv

but it keeps giving an error saying the object cannot be found
i have tried several groups and it cant find any
these groups do exist

here is the error

The operation couldn't be performed because object 'group name' couldn't be found on ''.
    + CategoryInfo          : InvalidData: (:) [Get-DistributionGroupMember], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : F05C848C,Microsoft.Exchange.Management.RecipientTasks.GetDistributionGroupMember
Who is Participating?
Muralidharan RConnect With a Mentor Associate ConsultantCommented:
yes.  Get-DistributionGroupMember does not work with the dynamic groups.

dynamic DL's are based on specific recipient filters rather than a defined set of recipients.

you need to use Get-DynamicDistributionGroup to get hte properties of dynamic DL.
Raheman M. AbdulSenior Infrastructure Support Analyst & Systems DeveloperCommented:
Open Exchange Management Shell and run:

Set-ADServerSettings -ViewEntireForest $True
Get-DistributionGroupMember -identity “group name” | Export-CSV C:\MyFile.Csv
dougdogAuthor Commented:
seems Get-DistributionGroupMember does not work with dynamic groups
Have you run it (a PS console)  an administrator?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.