Solved

Exchange 2007 - Script to count contacts?

Posted on 2011-03-21
2
1,747 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
[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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
A couple of months ago we ran into an issue that necessitated re-creating our Edge Subscriptions. However, when we attempted to execute the command: New-EdgeSubscription -filename C:\NewEdgeSub_01.xml we received an error indicating that the LDAP se…
In this video we show how to create an Address List 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 Organization >> Ad…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Suggested Courses

623 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