Ever wanted to export your CAS role settings?
Published Nov 14 2007 07:27 PM 7,990 Views

One of the more common requests we hear is that customers want a way to export the configuration settings for their Client Access servers. One reason for this is due to the unique way in which a Client Access server stores configuration settings and data. Client Access servers store their configuration data in multiple places:

  • Active Directory is used to store configuration information related to the Availability service, Exchange ActiveSync, and Outlook Web Access virtual directories
  • The Internet Information Services (IIS) metabase also stores configuration information for Exchange ActiveSync, as well as for Autodiscover, and Exchange Web Services
  • Local configuration files, such as Web.config files and the Windows registry are used to store configuration data related to Outlook Web Access, IMAP, POP3, the Availability service, Exchange ActiveSync, and information used by Exchange Setup.

It is critical to preserve Client Access server configuration data because if the server suffers a hardware failure, this configuration data will be needed in order to restore any custom configuration changes that were made to the server. This is because recovering a Client Access server using Setup /m:RecoverServer reverts all configuration to the default settings, and any customized configuration is lost.

For more details, see the topic "Client Access Server Data" at http://technet.microsoft.com/en-us/library/aa998364.aspx.

To simplify the preservation of critical Client Access server configuration data, we have created an Exchange Management Shell script (ExportCasConfig.ps1) that exports Client Access server configuration information to an XML file. This file can later be used as a reference for reconfiguring your Client Access server after Setup /m:RecoverServer has been run. You can also use this script to export the configuration of multiple Client Access servers and compare their settings.

NOTE: this is a sample script and it is not officially supported by Microsoft. Please see the script for more information.

Usage:

.\exportcasconfig -cloneConfigData:"C:\CASConfigData.xml" -Key:"A9ABA4D2C21C4bc58B303EA47BBE3608" (32 byte string used for password encryption/decryption)

The "Key" parameter is optional. This is there in case there are any Password fields that need to be encrypted in the configuration file. At this time, I'm not aware of any password fields that would be exported with this script for a Client Access server.

Warning:

This script only exports Client Access server-specific configuration data that is retrievable using Exchange Management Shell cmdlets. This script will not export:

  • Web.config files
  • Registry settings
  • Certificates
  • Certain IIS settings not available from the Exchange Management Shell, such as Require SSL, Web Site Bindings, Certificate Mappings, HTTP Redirects, etc.

You can download the script from here:

ExportCASConfig.ps1 script

(save as .txt and rename to .ps1 to run)

Enjoy! Comments welcome!

- Brad Hughes

12 Comments
Version history
Last update:
‎Jul 01 2019 03:32 PM
Updated by: