Export (0) Print
Expand All

Configure IFD settings (PowerShell)

Applies To: Microsoft Dynamics CRM 2013

This sample code is for Microsoft Dynamics CRM 2013. Download the Microsoft Dynamics CRM SDK package. It can be found in the following location in the download package:



To set up the Microsoft Dynamics CRM PowerShell cmdlets, see Administer the deployment using Windows PowerShell.


The following script will configure an Internet-facing deployment (IFD). You must specify the following parameters:

DiscoveryWebServiceRootDomain – The discovery Web service domain.

Enabled - A Boolean that indicates whether Internet-facing deployment (IFD) is enabled.

ExternalDomain - The external domain value for IFD.

OrganizationWebServiceRootDomain -The organization Web service domain.

WebApplicationRootDomain -The Web application server domain.


    #optional params

$RemoveSnapInWhenDone = $False

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

$IfdSettings = Get-CrmSetting -SettingType IfdSettings

if($DiscoveryWebServiceRootDomain) {$IfdSettings.DiscoveryWebServiceRootDomain = $DiscoveryWebServiceRootDomain}
if($ExternalDomain) {$IfdSettings.ExternalDomain = $ExternalDomain}
if($PSBoundParameters.ContainsKey('Enabled')) {$IfdSettings.Enabled = $Enabled}
if($OrganizationWebServiceRootDomain) {$IfdSettings.OrganizationWebServiceRootDomain = $OrganizationWebServiceRootDomain}
if($WebApplicationRootDomain) {$IfdSettings.WebApplicationRootDomain = $WebApplicationRootDomain}

Set-CrmSetting -Setting $IfdSettings


    Remove-PSSnapin Microsoft.Crm.PowerShell

See Also

Send comments about this article to Microsoft.

© 2014 Microsoft Corporation. All rights reserved.

Community Additions

© 2015 Microsoft