Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Exchange 2007 - Script to count contacts?

Posted on 2011-03-21
2
Medium Priority
?
1,785 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
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
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦
Suggested Courses

664 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