Friday, October 7, 2011

Exchange 2010 - PowerShell Commands - II

Remove User Mailbox UID after you've deleted from the EMC

Get-MailboxStatistics -Database 'Administration' | Where-Object {$_.DisconnectDate -Notlike $NULL} | FL DisplayName, DisconnectDate, MailboxGuid

Remove-Mailbox -Database 'Administration & Business Development' -StoreMailboxIdentity 889a9b8e-5883-42a6-a8a7-350483d34456

Get-MailboxStatistics -Server 'your-mb-svr.mmx.com'
Get-MailboxStatistics -Database "Operations"

Get-Message -Filter {FromAddress -like "*@gmail.com"} | Format-List

Restart-Service -InputObject (get-Service -ComputerName your-mb-svr -Name MSExchangeSA)

No comments: