Skip to content

Instantly share code, notes, and snippets.

@jangeador
Last active May 25, 2017 21:55
Show Gist options
  • Save jangeador/76f3248073e0cd13a10aa8e6c74eb15e to your computer and use it in GitHub Desktop.
Save jangeador/76f3248073e0cd13a10aa8e6c74eb15e to your computer and use it in GitHub Desktop.
Exchange 2010 Useful Commands
# Mailboxes size:
Get-MailboxDatabase | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Export-Csv "Z:\Mailboxes.csv"
# Databases size:
Get-MailboxDatabase -Status | Select-Object Name,@{N="DatabaseSize GB";E={$_.DatabaseSize.ToGB()}},AvailableNewMailboxSpace | Sort-Object Name | fl
# Move database to another drive or path:
move-DatabasePath -Identity '$DB' -EdbFilePath 'New_File_Path.edb' -LogFolderPath 'New_Log_Path'
# Get count per server
Get-Mailbox | Group-Object -Property:ServerName | Select-Object name,count
# Get count per database
Get-Mailbox | Group-Object -Property:Database | Select-Object name,count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment