General Information
This page shows neat tricks for powershell within exchange to get interesting information (one liners)
Checklist
get-mailbox -Filter { ForwardingAddress -like '*' } | select-object Name,ForwardingAddress
$mbox = Get-Mailbox; $mbox | Foreach { Get-InboxRule -Mailbox $_ }
If you have exchange 2010+ you can use the following commands to set a mailbox to allow people with “Send As” Permissions to leave a copy of messages they send as the mailbox into the shared mailboxes sent items.
Get-MaiboxSentItemsConfiguration <SharedAccountAlias>
Set-MailboxSentItemsConfiguration <SharedAccountAlias> -SendAsItemsCopiedTo SenderAndFrom
Set-MailboxSentItemsConfiguration <SharedAccountAlias> -SendOnBehalfOfItemsCopiedTo SenderAndFrom
If you move mailboxes, or delete a mailboxes or a large number of items, Exchange does not shrink the mailbox database, and instead creates whitespace, or “New Mailbox Space” to check the size of this, to determine if an offline defrag is necessary, use the following command.
Get-MailboxDatabase <'Database Name'> -Status | FL AvailableNewMailboxSpace
Get-MailboxDatabase -status | select Name, Servers, DatabaseSize, AvailableNewMailboxSpace
Get-MoveRequest | Get-MoveRequestStatistics
Get-MailboxDatabase | Get-MailboxStatistics | Select DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime | Sort-Object TotalItemSize -Descending | Export-CSV c:\temp\[ReportName].csv
Get-Mailbox | Group-Object -Property:Database | Select-Object Name,Count | Sort-Object Name | Format-Table -Auto