Solved

Distribution List Membership of Mail Contacts

Posted on 2014-11-24
1
95 Views
Last Modified: 2014-12-30
Experts,

I'm using Exchange 2010 with Outlook 2010.

I use distribution lists with mail contacts to send to our membership.  I'm looking to clean up my Exchange mail contacts and I know that if they aren't attached to any DL's after I've created this year's lists, that they can be purged.  
I'm trying to create a list filtering on addresslistmembership, assuming if the value is zero, I'll get my results.  I'll then export it to csv, check it then run a purge based on an edited CSV.
So here's what I tried:
Get-contact | where {$.addresslistmembership –eq 0}
I get nothing with this...

However, if I reverse it:
Get-contact | where {$.addresslistmembership –ne 0}

I get a list of contacts that are attached to DL's.  

Not sure what I'm doing wrong or how best to approach this and I'm looking for suggestions.

Thanks!
0
Comment
Question by:algren13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
Rajitha Chimmani earned 500 total points
ID: 40463364
You are looking for DL membership using GAL membership property and the syntax is not correct. The best or the easiest I could find is to get all mail contacts with their Name and Memberof property into a csv file and filter  the contacts with null value.

Import-Module ActiveDirectory
Get-MailContact | %{Get-ADObject $_.GUID -Properties Memberof | Select Name,Memberof >> contacts.csv}
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
This video discusses moving either the default database or any database to a new volume.

729 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