Solved

Distribution List Membership of Mail Contacts

Posted on 2014-11-24
1
89 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
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
In this video we show how to create a Distribution Group 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 Recipients >>…
This video discusses moving either the default database or any database to a new volume.

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now