Saturday, June 6, 2009

Get-ExchangeServer Mailbox Count

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.

PS


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

Click below to download it

image

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
image

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

image

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

image

here is the output

image

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

 

 

image

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

image

Cheers,

oz

Oz Casey Dedeal

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

Http://smtp25.blogspot.com (Blog)

Https://telnet25.spaces.live.com (Blog)

Https://telnet25.worldpress.com (Blog)

2 comments:

Anonymous said...

Thanks - it worked like a charm, and we even discovered a corrupt mailbox in the process! Brook

johncarter said...

As per my recent experience, I have been successfully convert my entire Exchange EDB mailboxes into Outlook PST format. I found this EDB to PST Converter online by searching in google. It gave my data back with safety and within my budget too. I have been truly satisfied with this EDB conversion to PST tool.

I would like to recommend this EdbMails EDB to PST Conversion Software on the basis of experience. you can also convert Exchange EDB to PST including of entire EDB emails with attachment, Meta Data (To, CC, From, BCC, Body Content), Sent items, Inbox and other all existed database of Exchange EDB file quickly.

For more information visit:EDB to PST Converter