Cloning Exchange 2010 Database Settings from a source Database

by Andy Grogan [Published on 3 Aug. 2011 / Last Updated on 1 April 2011]

One of the most annoying jobs for an Exchange admin is replicating databases settings in large installations between databases. From within and using the basic tools if you wish for a number of databases to have the same “IssueWarningQuota” for example – means that you have to set this value on each databases manually. Not so much of a problem if you have 5 databases – however it can be a real pain if you have 20 or more. This tip will show you how you can use Powershell to copy common settings to a target databases from a template.

Exchange 2010 Databases have a number of common configurable properties – for example;

OfflineAddressBook       : \Default Offline Address Book

ProhibitSendReceiveQuota : 600 MB (629,145,600 bytes)

ProhibitSendQuota        : 500 MB (524,288,000 bytes)

DeletedItemRetention     : 30.00:00:00

IssueWarningQuota        : 400 MB (419,430,400 bytes)

MailboxRetention         : 60.00:00:00

 

All of the above can set on a per databases basis via the Exchange Management Console or via the Exchange Management Shell.

Working with these settings on a per database level when you only have 5 databases within your environment is not very difficult – however, if you have 20 or more that you wish to share common settings, configuring theses values can become very time consuming and repetitive – especially via the Management Console.

However the following is a sample Powershell script which you can customise to suite your own needs (e.g. add further properties to copy, or inset a loop which copies settings to all DB’s on a certain server) that will copy the settings that you specify from a template database to a source database:

# Get a template Database and relevant properties (you can get more by retrieving them via the Get-MailboxDatabase CMDlet) that you wish to "copy" into a variable called $Template

 

$Template = Get-MailboxDatabase "prod-ex2010-01-General-1" | select offlineaddressbook,prohibitsendreceivequota,prohibitsendquota,deleteditemretention,issuewarningquota,mailboxretention

 

# Use the Set-MailboxDatabase command to configure the properties which are located in the $template variable

 

Set-MailboxDatabase "prod-ex2010-01-General-2" -OfflineAddressBook $Template.offlineAddressBook -IssueWarningQuota $Template.issuewarningquota -ProhibitSendQuota $Template.prohibitsendquota -ProhibitSendReceiveQuota $Template.prohibitsendreceivequota

See Also


See Also

Featured Links