Solved

Exchange 2007 - Script to count contacts?

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

Will my email signature work in Office 365?

You've built an email signature using raw HTML code in Office 365, but you can't review how it looks with Transport Rules. So you have to test it over and over again before it can be used. Isn't this a bit of a waste of your time? Wouldn't a WYSIWYG editor make it a lot easier?

Question has a verified solution.

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

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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.
In this video we show how to create a Contact 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 >> Contact ta…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

929 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

11 Experts available now in Live!

Get 1:1 Help Now