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
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
Cheers,
oz
Oz Casey Dedeal
MVP (Exchange)
MCITP (EMA), MCITP (SA)
MCSE 2003, M+, S+, MCDST
Security+, Project +, Server +
Http://smtp25.blogspot.com (Blog)
1 comment:
Thanks - it worked like a charm, and we even discovered a corrupt mailbox in the process! Brook
Post a Comment