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
Exchange 2010 and higher:- remove a database copy and database using powershell

To remove a mailbox database, you can run the command below:

  • Remove-MailboxDatabase “DAGA-STORE”
Exchange 2010 and higher:- remove a database copy and database using powershell

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.

    wpChatIcon

    Discover more from Everything-PowerShell

    Subscribe now to keep reading and get access to the full archive.

    Continue reading