MsExchange Blog Spot Telnet25

June 6, 2009

Get-ExchangeServer Mailbox Count

Filed under: General (1) — telnet25 @ 8:15 pm

If you want to get quickly the mailbox count on each storage group on specific mail server or all mail servers here is the PS script and PowerGUI usage, remember to include this one to your existing PowerGUI toolbox for daily usage. Exporting these outputs to CSV file is incredibly easy with powerGUI.


Get-ExchangeServer | Get-MailboxDatabase | select Identity,@{n=’MailboxCount’;e={@(Get-Mailbox -database $_.identity).count}}

Click below to download it


One thing I found very convenient to do and more useful for learning PS is to use PowerGUI script editor first to test the PS script to make sure it is producing expected results and when all good open PowerGUI.

  • Open PowerGUI Script Editor


  • To run the script press green run arrow on top or simply use
  • CTRL + F5


  • Open PowerGUI now go to your PS Scripts folders
  • right click
  • Script node simply copy and paste the same PS code


here is the output


And your script library is getting more powerful each time you add another one




those of you who have been fallowing these simple way of building powerful scripting library will already see the power of PS and powerGUI, when you have right tools and right mind set you don’t have to be so smart to get the work done (-:

and finally get your free kung-FU Panda Power GUI exchange BG and hope you like it , click on the picture to go to my SkyDrive to download the free Backgrounds





Oz Casey Dedeal

MVP (Exchange)
MCSE 2003, M+, S+, MCDST
Security+, Project +, Server +

Http:// (Blog)

Https:// (Blog)

Https:// (Blog)


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: