### List all the mailboxes on the database ### Get-Mailbox -database "mailbox*" Get-Mailbox -database "mailbox*" -publicfolder Get-Mailbox -database "mailbox*" -auditlog Get-Mailbox -database "mailbox*" -archive Get-Mailbox -database "mailbox*" -arbitration Get-Mailbox -database "mailbox*" -monitoring ## Move all types of mailboxes from the database ### Get-Mailbox -Database "mailbox*" | New-MoveRequest Get-Mailbox -Database "mailbox*" -Arbitration | New-MoveRequest Get-Mailbox -Database "mailbox*" -PublicFolder | New-MoveRequest Get-Mailbox -Database "mailbox*" -AuditLog | New-MoveRequest Get-Mailbox -Database "mailbox*" -Monitoring | New-MoveRequest ### check the move request progress ### Get-MoveRequest Get-MoveRequest | Get-MoveRequestStatistics ### Add mailbox server to maintenance mode ### Set-ServerComponentState $Env:Computername -Component HubTransport -State Draining -Requester Maintenance Redirect-Message -Server $Env:Computername -Target Ex19-01.ps.local Set-MailboxServer $Env:Computername -DatabaseCopyActivationDisabledAndMoveNow $True Set-MailboxServer $Env:Computername -DatabaseCopyAutoActivationPolicy Blocked Set-ServerComponentState $Env:Computername -Component ServerWideOffline -State Inactive -Requester Maintenance Get-ServerComponentState $Env:ComputerName | Where{$_.State -like "Active"} | ft Component, State -Autosize Get-MailboxDatabaseCopyStatus -Server $Env:Computername | Where {$_.Status -eq "Mounted"} ### Check Mailbox Database Copies ### Get-mailboxDatabaseCopyStatus ### Stop and Disable Exchange Services ### Get-Service Get-Service | ?{$_.DisplayName -like "Microsoft Exchange*"} | Stop-Service -Passthru Get-Service | ?{$_.DisplayName -like "Microsoft Exchange*"} | Set-Service -StartupType Disabled ### Test Exchange Services ### Test-Mailflow Test-Replicationhealth Test-ServiceHealth Get-Mailbox ### Remove Mailbox Database ### Get-MailboxDatabase -Server | Remove-MailboxDatabase -Confirm:$False ### Remove Migration Batch ### Get-MigrationBatch Get-MigrationBatch | Remove-MigrationBatch -Confirm:$False ### Uninstall Exchange From Command Prompt ### # Change Command Prompt working Directory to Exchange ISO / Setup file location ExchangeInstallationDrive:\ #Example:- D: .\Setup /mode:Uninstall