Ever wanted to export your CAS role settings?


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

Comments (12)
  1. Joe says:

    When do we get SP1 RTM?

    We’re dying in the trenches out here without it :(

    VSS issues/backup issues/public folders/etc

    Please on behalf of us all we’re begging you. PLZ give us SP1 RTM

  2. Julián says:

    Thanks Brad. Excellent script. haven’t run it yet, but what about importing this data after a hardware failure? How would it be done?

    Regards.

    Julián

  3. Brad Hughes says:

    Julian,

    Right now, it must be done manually.  The exported file is just a reference. Thanks for the idea though :)

    Brad

  4. KB says:

    I think you gave yourself some ideas for the next version… capture some of those other settings.  That plus it would be cool to see some KB articles or blog posts on where all the settings are and what they do (especially the ones in the config files seem to be somewhat undocumented).

  5. Adam says:

    Dear Exchange Team,

    I work for a large financial services organisation and have been trying to put together a plan for a test pilot of Exchange UC & OCS2007.

    You are making this near impossible by not giving any indication as to the RTM of SP1?

    Why are you incapable of supplying dates, even dates with room for error are better than none.

    There is nothing clever about an "out of the blue" release, any mickey mouse software company could do this.

    Please give a release indication.

    A

  6. James says:

    Just echoing everyone elses comments, it really is pretty woeful Microsoft Chappies that you’re not giving people a bit more of a steer on the release of SP1 RTM….. Surely you can provide some sort of timeline on when this might be available for download… Its not only pretty unprofessional but very very frustrating for all concerned….

    From one very unhappy Exchange Server Admin!

  7. Exchange says:

    Adam, James, Joe and everyone else who wants to know when we will release E2007 SP1:

    I know it is not what you wanted to hear however – the answer is still the same as it was; "Q4 of calendar year 2007" as we announced before. That effectively gives us little over a month (worst case scenario) to release the final SP1 to the web. I personally do not believe that you will have to wait that long however – please understand that for every customer that is unhappy that we do not give out the firm date, there would be one that would be unhappy if we gave it, then the date was used to plan business decisions and then we decided to postpone the release to reach the quality bar we want it to have and those business plans get messed up. It is always a balancing act and it is never going to make everyone happy. :(

  8. Chris says:

    Brad,

    Exporting data is great, but am I expected to import it all manually?  So once I have the data, what should I do with it without an import function.  Seems kindof pointless with out it.

  9. ILikeThis says:

    +1 on what Chris said!

    The pair of export/import scripts would be very useful to "back up" our CAS settings. "Comparing" exports is nice but you must be able to see the value in import part too? Can we get it, please?

  10. KB says:

    RE: SP1…. if it is firmly known internally that it won’t be released in the next x# of weeks, that is useful information that I don’t think anyone would be unhappy with, whenever that information is known.  For example, perhaps at the beginning of Q4 it was known that there would be no way it would be out in October.  Otherwise on our end it makes for nearly 100% unhappy managers because we have to say "it might be out today, it might be out tomorrow" instead of "it’s going to be at least a few weeks".

  11. Ronin says:

    Regarding SP1… how about u guys release on December 25th that way we can be all ready to install it on christmas day…. be a lovely xmas present from "Microsoft" with love.

  12. Jeff says:

    I would love the possibility of bringing up a test CAS server and get it all configured for live users (on a temporary system) and then be able to export that data and move it to a real production system without having to reconfigure it from scratch.

    My example is that I don’t have the production live hardware yet (it is currently configured as an OWA 2003 front end server, 2 load balanced servers). I would like to bring up the first CAS on a server that is going to be out of warranty next year and configure it for our organization and then when we get closer to the cutover of all mailboxes, I would like to rebuild our present OWA servers (one at a time) to be the permanent CAS’s (it is x64) and having the ability to export from the temp CAS and import to the new CAS’s would be the most ideal way of doing it if possible.

Comments are closed.