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


Exchange 2010 scripting

Posted on 2013-10-29
Medium Priority
Last Modified: 2013-10-29
I've been trying to create a PS script to list all mailboxes on our Exchange 2010 server. I only want listed the username, Item Count in mailbox and size of mailbox. Can someone help I keep getting unknown data?

Also is there a way to get item count of a personal folder?
Question by:donebert
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
  • 2
LVL 52

Assisted Solution

by:Manpreet SIngh Khatra
Manpreet SIngh Khatra earned 1000 total points
ID: 39609094
Get-Mailbox | Get-MailboxStatistics | FL Name, TotalItemCount, TotalitemSize > C:\MailboxData.csv

If by personal folder you mean PST then no :(

- Rancy
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
ID: 39609103
Get-MailboxReport.ps1 – PowerShell Script to Generate Mailbox Reports

How to Calculate Exchange 2010 Mailbox Sizes with PowerShell

- Rancy

Accepted Solution

SsbMs earned 1000 total points
ID: 39609140
[PS] C:\Windows\system32>Get-Content "C:\test.txt" | Get-Mailbox | Select-Object Displayname,Database,@{Name='TotalItize'; Expression={[String]::join(";",((Get-MailboxStatistics -identity $_.identity).TotalItemSize))}},@{Name='ItemCout; Expression={[String]::join(";",((Get-MailboxStatistics -identity $_.identity).ItemCount))}} > c:\test.csv

Expert Comment

ID: 39609144
Give all the user Alias in test.txt

Author Closing Comment

ID: 39609418
Thank you both

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
In this video we show how to create an email address policy 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 Mail Flow…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses

722 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