Use Advanced Configuration Settings (ConfigDB)

[Applies to: Microsoft Dynamics CRM 2011]

In addition to the core deployment entities and messages described so far, the Microsoft Dynamics CRM 2011 deployment service allows you to read and update advanced deployment settings stored in the configuration database.


You should use the advanced settings only when indicated to do so by the Microsoft Dynamics CRM customer support representatives.

You can use the RetrieveAdvancedSettingsRequest message specifying the name of the table from the configuration database. Some of these settings are writable and if you are directed to they can be updated using the UpdateAdvancedSettingsRequest message.

Configuration Database Tables

The following table lists the possible tables you can retrieve and set using the RetrieveAdvancedSettingsRequest message.

Configuration database table name Description


Contains key settings specific to each type of key.


Contains deployment settings.


Contains organization data required outside organization context.


Contains a listing of enabled features.


Contains server settings for the Microsoft Dynamics CRM Online server.


The following sample shows how to retrieve a table from the configuration database and update a setting.

RetrieveAdvancedSettingsRequest request = new RetrieveAdvancedSettingsRequest() {
   ConfigurationEntityName = "Deployment";
   ColumnSet.AllColumns = false; // Returns only writable properties.
RetrieveAdvancedSettingsResponse response = service.Execute(request);
ConfigurationEntity configEntity = response.Entity;

ConfigurationEntity entity = new ConfigurationEntity();
entity.LogicalName = "Deployment";
entity.Attributes = new AttributeCollection();
entity.Attributes.Add(new KeyValuePair<string, object>("AutomaticallyInstallDatabaseUpdates", true));
UpdateAdvancedSettingsRequest request2 = new UpdateAdvancedSettingsRequest();
request.Entity = entity;

Read and Update Advanced Settings with PowerShell

In Windows PowerShell, you can use the Get-CrmAdvancedSetting and Set-CrmAdvancedSetting commands to get all values from the advanced settings tables, and set writable values in the tables. However, you cannot use the returned object from Get-CrmAdvancedSetting for Set-CrmAdvancedSetting. Use the following PowerShell script to set one of the writable settings. This script can be found in the SDK download package in the SampleCode\PS\SetAdvancedSettings.ps1 file.

    #optional params

$RemoveSnapInWhenDone = $False

if (-not (Get-PSSnapin -Name Microsoft.Crm.PowerShell -ErrorAction SilentlyContinue))
    Add-PSSnapin Microsoft.Crm.PowerShell
    $RemoveSnapInWhenDone = $True

$setting = New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"
$setting.LogicalName = $ConfigurationEntityName
if($Id) { $setting.Id = $Id }

$setting.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"
$keypair = New-Object "System.Collections.Generic.KeyValuePair[String, Object]" ($SettingName, $SettingValue)

Set-CrmAdvancedSetting -Entity $setting

    Remove-PSSnapin Microsoft.Crm.PowerShell

See Also


CmdKeySetting Table Metadata (Advanced Settings)
Deployment Table Metadata (Advanced Settings)
Organization Table Metadata (Advanced Settings)
ServerSettings Table Metadata (Advanced Settings)

Other Resources

Deployment Web Service in Microsoft Dynamics CRM

Microsoft Dynamics CRM 2011
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.