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.

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)

Advertisements

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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: