Automate Exchange Database copy addition

Sometime when Exchange server crashed or newly build server need to have Exchange databases copies, it become a verytime consuming to add multiple database copies on server.

You may face same manualy work while doing datacenter migrations.

 

You can simply use below method to add database copies.

Firest you have to put Db name in CSV file and save that to some location on Exchange servers.

Format can be like this:-

Name

DB1

DB2

 

After that run below to add mailbox database copies:-

 

Import-Csv “C:\Test\DB.csv” | ForEach-Object {Add-MailboxDatabaseCopy -Identity $_.Name -MailboxServer Ex2 -ActivationPreference 2}

 

If you want to add copy on multiple server then you can do like below:-

 

 

Import-Csv “C:\Test\DB.csv” | ForEach-Object

{

Add-MailboxDatabaseCopy -Identity $_.Name -MailboxServer Ex2 -ActivationPreference 2

Add-MailboxDatabaseCopy -Identity $_.Name -MailboxServer Ex3 -ActivationPreference 3

}

  

It will save a lot of time.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.