Wednesday, July 1, 2009

PowerGUI, Get-Mailbox DisplayName,Department,StorageGroup,TotalSize (MB)

One of the question was asked how to get the information about usermail boxes , Storage Groups and the AD Attribute Department all together.

In previous posts we have already covered how to make any PowerGUI script to be e-mailed via windows scheduled task so this query also will be very handy.

Click here

image


Get-Mailbox -resultsize unlimited | select @{Name="User Name";expression={$_.displayname}},@{Name="Department";expression={(get-user $_.alias).department}},@{Name="Storage Group";
expression={$_.database}}, @{Name="Total Size (MB)";expression={(get-mailboxstatistics $_).totalitemsize.value.toMB()}}

 

image

 

image

 

 

image

All Credits goes to PowerGUI

image

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)

1 comment:

Ron Buzon said...

Get-Mailbox -resultsize unlimited -| select @{.......



You can change the first part of the script upon your preference. The data can be based on DL and SG or which server they are at.

EG.
Get-distributiongroup hrmanager | Get-Mailbox -resultsize unlimited -| select @{.......