Find Users belonging/member of Distribution List
Hello, I would need a shell command to get the list of users member of distribution lists. For example: User1 belongs to the distribution lists DG1, DG67, DG98 I would need to get for instance: User1 member of: - DG1 - DG67 - DG98 Thanks in advance to all of u
February 12th, 2010 12:41pm

What is your workstation OS, and what is your domain level?If you've got W7 and the ActiveDirectory module from the RSAT tools (requires a 2008 domain, or a 2003 domain with the AD Gateway service on at least one DC, you can do this:get-adprincipalgroupmembership user1
Free Windows Admin Tool Kit Click here and download it now
February 12th, 2010 4:54pm

Hi, Here is one liner powelrshell command for your porblem: Get-DistributionGroup | where { (Get-DistributionGroupMember $_ | foreach {$_.PrimarySmtpAddress}) -contains "mailbox@domain.com" } Put the primary email address of the user whose DGs are you looking for instead of mailbox@domain.com. Also you can put some other attribute too instead of PrimarySmtpAddress like this: Get-DistributionGroup | where { (Get-DistributionGroupMember $_ | foreach {$_.Name}) -contains "userName" } Regards, Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
February 14th, 2010 1:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics