windows_wiki:powershell_exchange

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
windows_wiki:powershell_exchange [2015/03/09 23:45]
billdozor
windows_wiki:powershell_exchange [2019/05/25 23:50] (current)
Line 2: Line 2:
  
 **General Information** **General Information**
 +
 This page shows neat tricks for powershell within exchange to get interesting information (one liners) This page shows neat tricks for powershell within exchange to get interesting information (one liners)
  
Line 18: Line 19:
 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. 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 current status**   * **Get current status**
-  *   * ''Get-MaiboxSentItemsConfiguration <SharedAccountAlias>''+  *    ''Get-MaiboxSentItemsConfiguration <SharedAccountAlias>''
   * **Send As:**    * **Send As:** 
-  *   * ''Set-MailboxSentItemsConfiguration <SharedAccountAlias> -SendAsItemsCopiedTo SenderAndFrom''+  *    ''Set-MailboxSentItemsConfiguration <SharedAccountAlias> -SendAsItemsCopiedTo SenderAndFrom''
   * **Send On Behalf:**    * **Send On Behalf:** 
-  *   * ''Set-MailboxSentItemsConfiguration <SharedAccountAlias> -SendOnBehalfOfItemsCopiedTo SenderAndFrom''+  *    ''Set-MailboxSentItemsConfiguration <SharedAccountAlias> -SendOnBehalfOfItemsCopiedTo SenderAndFrom'' 
 + 
 +====View Whitespace in Mailbox Database==== 
 +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'' 
 + 
 +====View Size and Whitespace in all Mailbox Databases==== 
 +  *    ''Get-MailboxDatabase -status | select Name, Servers, DatabaseSize, AvailableNewMailboxSpace'' 
 + 
 +====Get Details about Mailbox Move Requests==== 
 +  *    ''Get-MoveRequest | Get-MoveRequestStatistics'' 
 + 
 +====Generate Report of Mailbox Utilization==== 
 +  *   ''Get-MailboxDatabase | Get-MailboxStatistics | Select DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime | Sort-Object TotalItemSize -Descending | Export-CSV c:\temp\[ReportName].csv'' 
 + 
 +====Count the Number of Mailboxes in Each Database==== 
 +  *   ''Get-Mailbox | Group-Object -Property:Database | Select-Object Name,Count | Sort-Object Name | Format-Table -Auto''
  • windows_wiki/powershell_exchange.1425959119.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)