Solved

Exchange 2007 - Script to count contacts?

Posted on 2011-03-21
2
1,615 Views
Last Modified: 2012-06-22
Does anyone have a script that I can run that will tell me how many contacts each user has?  We are going to implement a CRM and marketing is asking me how many contacts that each user has.  Thank you for your help.
0
Comment
Question by:mattpayne59
2 Comments
 
LVL 74

Accepted Solution

by:
Glen Knight earned 500 total points
ID: 35187934
This should work, I've just tested it on Exchange 2007 and Exchange 2010.

Get-Mailbox -ResultSize Unlimited | Sort-Object -Property DisplayName | get-MailboxFolderStatistics -FolderScope Contacts | Format-Table Identity, ItemsInFolder

This will give you the mailbox and the number of items.
1
 

Author Comment

by:mattpayne59
ID: 35190306
Got me close enough.  The Identity column was cutting off and not really showing me the name.  Here was my final script:

Get-Mailbox | foreach {
   $mbx = $_.DisplayName;
   Get-MailboxFolderStatistics $_.identity -FolderScope 'Contacts' | select @{n="DisplayName";e={$mbx}},FolderPath,ItemsInFolder} | export-csv c:\TEST.csv

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
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…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

708 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

10 Experts available now in Live!

Get 1:1 Help Now