Help with Exchange Powershell commands
Hi
Is someone able to help me out with the below Powershell commands to help me manage my Exchange 2007 environment?
i. On a given database (e.g. Exch1SG1DB1), a list of member mailboxes along with their sizes of mailboxes
ii. As above, but sorting by size? Is this possible? Or does anyone know how to do this using Excel or something?
iii. A list of all mailbox databases starting with "EMEA" (e.g. EMEAExch1SG1DB1) and their users
iv. Is it possible to do the above and show size of the database too?
Any help would be really appreciated!
February 8th, 2011 3:54pm
On Tue, 8 Feb 2011 20:48:31 +0000, Elpaso1 wrote:
>
>
>Hi
>
>Is someone able to help me out with the below Powershell commands to help me manage my Exchange 2007 environment?
>
>i. On a given database (e.g. Exch1SG1DB1), a list of member mailboxes along with their sizes of mailboxes
Use the "get-mailboxstatistics" cmdlet.
>ii. As above, but sorting by size? Is this possible? Or does anyone know how to do this using Excel or something?
Pipe the output from the get-mailboxstatistics into sort-object
>iii. A list of all mailbox databases starting with "EMEA" (e.g. EMEAExch1SG1DB1) and their users
get-mailboxdatabase | where {$_.name -like "EMEA*"} | get-mailbox
>iv. Is it possible to do the above and show size of the database too?
get-mailboxdatabase | foreach {(get-item -path $_.edbfilepath).length}
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
February 8th, 2011 8:11pm
Hi,
In addition Rich's post,
Get-MailboxStatistics -Database "your database name" | Select-Object DisplayName, TotalItemSize
Get-MailboxStatistics -Database "your database name" | Select-Object DisplayName, TotalItemSize | Sort-Object TotalItemsSize
The following articles will also help you have a deep knowledge of database statistics.
Get-MailboxStatistics:
http://technet.microsoft.com/en-us/library/bb124612(EXCHG.80).aspx
Getting Mailbox Statistics in Exchange 2007:
http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/getting-mailbox-statistics-exchange-2007.html
Exchange 2007: Database Statistics in PowerShell:
http://exchangeshare.wordpress.com/2009/07/27/exchange-2007-database-statistics-in-powershell/
Get-Mailboxdatabase
http://technet.microsoft.com/en-us/library/bb124924(EXCHG.80).aspx
Best regards,
Serena
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
February 10th, 2011 4:42am