Exchange 2010 and higher:- Remove a database copy and database using PowerShell
Removing an Exchange Database copy or a database should not be hardwork, especially when it can be done with the Exchange Management Shell.
**Take note, if you have circular logging enabled, you need to firstly disable it before you can remove an Exchange database copy**
To remove a mailbox database copy, you can run the following command:
- Remove-MailboxDatabaseCopy -Identity “DAGA-Store\MBX01”
If you run the above you will be prompted to confirm the action, if you want to remove that step, you can run this command which will just run the command:
- Remove-MailboxDatabaseCopy -Identity “DAGA-Store\MBX01” -Confirm:$all
To remove a mailbox database, you can run the command below:
- Remove-MailboxDatabase “DAGA-STORE”
As you can see we are not specifying a server name after the DAG name, you will also be prompted and can use the -Confirm:$all switch at the end of the command as well.
Hope it helps.