Install Microsoft Dynamics 365 for Outlook using a command prompt

Installing Microsoft Dynamics 365 for Outlook is a two-step procedure. First, you must run Setup to install the files on the computer. Next, run the Dynamics 365 for Customer EngagementConfiguration Wizard to configure the application and complete the installation.

Important

If there’s a conflict between a value in the configuration file and a value in the command-line parameters, the command-line parameter takes precedence.

Step 1: Install files

Note

See Install Dynamics 365 for Outlook for download instructions.

The following command displays the available options to run Microsoft Dynamics CRM for Outlook Setup at the command prompt:

Setupclient.exe [/A] [/Q] [/X] [/L or /LV "[drive:][[ path] logfilename.log]"] [/targetdir "[drive:][ path]"] [/installofflinecapability] [/disableofflinecapability] [/ignoreofflinequeue]

Command examples for Dynamics 365 for Outlook installation

For users who travel or who are not always connected to the Dynamics 365 Server, Dynamics 365 for Microsoft Office Outlook with Offline Access provides access to their customer data. To install Dynamics 365 for Microsoft Office Outlook with Offline Access in quiet mode:

Setupclient /Q /l c:\clientinstalllog.txt /installofflinecapability /targetdir "c:\Program Files\Microsoft Dynamics CRM Client"

To uninstall Dynamics 365 for Microsoft Office Outlook with Offline Access in quiet mode:

SetupClient /x /q

Parameters for Dynamics 365 for Outlook installation

Parameter Description
None Used without parameters, Setupclient.exe will run with all display screens.
installofflinecapability Determines whether offline capability will be installed. When you include this parameter, offline capability and components are installed. If you don’t specify this parameter, the online-only client is installed.
/targetdir <"drive:\path"> Specifies the folder in which Dynamics 365 for Outlook files will be installed.
/A Creates an administrative installation of Dynamics 365 for Outlook by creating a Windows Installer package. This package lets users run Setup from a network share or lets non-administrative users run Setup that is driven from a group policy. This parameter must be used with the /targetdir parameter described earlier. When using this parameter, the /targetdir value doesn’t have to be located on the local computer. A mapped drive or network share, such as \\share\mscrm_client_admin, can be used. Important: If you don’t specify a target folder by using the /targetdir parameter, Setup installs the administrative installation to the default folder <drive:> Program Files\Microsoft Dynamics CRM.

For example, the command:

Setupclient /Q /A /targetdir "\\share\mscrm_client_admin"
/Q Quiet mode installation. This parameter requires a configuration file in XML format. The /i parameter contains the name of the XML configuration file. No dialog boxes or error messages will appear on the display screen. To capture error message information, include the log file parameter (/L or /LV).
/L [drive:][[path] logfilename.log] Creates a log file of installation activity. You must specify the file name of the log file and where to put it, but the path can’t be a relative path, such as %appdata%\CRMLogs.
/LV [drive:][[path] logfilename.log] Creates a verbose log file of installation activity. You must specify the file name of the log file and where to put it, but the path can’t be a relative path, such as %appdata%\CRMLogs.
disableofflinecapability When you specify this parameter, Dynamics 365 for Outlook is configured to hide the “go offline” button in the application. This button lets users switch to Dynamics 365 for Outlook with offline capability.
ignoreofflinequeue When you specify this parameter, Setup will not attempt to synchronize items that may remain in the offline queue during upgrade.
/X Uninstalls Dynamics 365 for Outlook. This is a maintenance mode option that is only available when the application is already installed.

Sample Dynamics 365 for Outlook XML configuration file for installation

The following configuration-file example installs Dynamics 365 for Outlook without offline access capability into the Program Files folder.

Note

You can use the same file that includes both the installation and configuration elements. Setup and the Configuration Wizard ignore the elements that aren’t relevant to the operation.

<Deployments>
<TargetDir>c:\program files\Microsoft Dynamics CRM\Client</TargetDir>
<InstallOfflineCapability>false</InstallOfflineCapability>
</Deployments>

Step 2: Configure Dynamics 365 for Outlook by using an XML configuration file

After you install Dynamics 365 for Outlook, you must configure it. You can do this by running the Dynamics 365 for OutlookConfiguration Wizard at the command prompt. The Configuration Wizard file is named Microsoft.Crm.Application.Outlook.ConfigWizard.exe and is located in the Client\ConfigWizard folder where Dynamics 365 for Outlook is installed. By default, the folder is C:\Program Files\Microsoft Dynamics CRM.

Note

The credentials of the user who will run Dynamics 365 for Outlook are used to authenticate to Dynamics 365 for Customer Engagement. Therefore, to perform a silent configuration of Dynamics 365 for Outlook, you must run the Configuration Wizard under the user's context, such as by running a user-invoked batch file or as a one-time entry in a logon script. For more information, see User credentials are required when you run the Configuration Wizard. To deploy Dynamics 365 for Outlook by using Microsoft Group Policy, see Deploy Microsoft Dynamics 365 for Outlook by using Group Policy.

If a path to the configuration file isn’t specified, the Configuration Wizard looks for the default configuration file (default_client_config.xml) in the non-roaming profile folder (%localappdata%\Microsoft\MSCRM\). If the file isn’t located in the non-roaming profile folder, the Configuration Wizard looks for the folder where Dynamics 365 for Outlook is installed. By default, Dynamics 365 for Outlook is installed in the C:\Program Files\Microsoft Dynamics CRM folder.

If the configuration file is located in the roaming location used by other applications (AppData\Roaming\Microsoft\MSCRM\), it won’t be honored.

Command examples for the Dynamics 365 for Outlook configuration

The following command configures Microsoft Dynamics 365 for Outlook with Offline Access by using a file named config_client.xml in quiet mode, and outputs a log file named clientinstall.log:

Microsoft.Crm.Application.Outlook.ConfigWizard.exe /Q /i c:\config_client.xml /xa /l c:\clientinstall.log

The /Q quiet mode configuration parameter requires a configuration file in XML format. No dialog boxes or error messages will appear on the display screen. To capture error message information, include the log file parameter (/L) or verbose logging (/LV).

Important

Valid user credentials stored in the Windows Vault are required to run the Configuration Wizard in quiet mode. More information: User credentials are required when you run the Configuration Wizard

The /i [drive:] [[path] configfilename.xml]] command-line parameter provides Microsoft Dynamics CRM for Outlook Setup with required information. It is the same information that each installation screen requires. The XML elements must be in English (US); special or extended characters can’t be used. An XML configuration file that has localized XML elements will not work correctly. An explanation of each XML element and a sample XML file follows:

The /xa parameter, when used with the /q parameter, removes all organizations that are configured for Dynamics 365 for Outlook.

The /R parameter may be used to suppress the Configuration Wizard user interface and only display the progress dialog box. This parameter requires a valid XMLSetup file that is named Default_Client_Config.xml and must be located in either the local user AppData or Client installation folder.

Dynamics 365 for Outlook XML configuration file elements

Element Description
<Deployments> </Deployments> The configuration file must be a valid XML file that uses <Deployment> as the root element.
<InstallOfflineCapability>true/false</InstallOfflineCapability> Specifies the type of Dynamics 365 for Outlook installation. Specifying true will install Microsoft Dynamics 365 for Outlook with Offline Access capability.
<TargetDir>drive:\path</TargetDirectory> Specifies the folder in which Dynamics 365 for Outlook files will be installed.
<Deployment> </Deployment> Parent element for all of the following elements.
<DiscoveryUrl>https://website:portnumber</DiscoveryUrl> Specifies the URL for the Dynamics 365 for Customer EngagementDiscovery Web Service.

For Dynamics 365 for Customer Engagement, use the full organization URL, such as https://orgname.crm.dynamics.com, or depending on your online environment and location, use the discovery service URL, in the form https://disco.crm.dynamics.com. For a list of URLs, see MSDN: Discovery service.
<FederatedAuthentication>true/false</FederatedAuthentication> Specifies if federated (Azure Active Directory) credentials are used for authentication in the Configuration Wizard. If you specify false, you can use credentials such as user@contoso.onmicrosoft.com.
<Organizations> </Organizations> This is the parent element for the following <Organization> element.
<Organization FriendlyName="My Friendly Organization Name" IsPrimary="true"/"false">OrganizationName</Organization> Specifies the name of the organization that the client will connect to.

FriendlyName. Specifies a different display name other than the organization name in Outlook.

IsPrimary. Specifies the organization that will be configured as the synchronizing organization in Dynamics 365 for Outlook. Note: OrganizationName is case-sensitive.
<CEIPNotification>true/false</CEIPNotification> Specifies whether Dynamics 365 for Outlook will display the “I want to join the Customer Experience Improvement Program” notification banner. The default setting is true and the notification banner is displayed. If you specify false, the notification banner doesn’t appear in Dynamics 365 for Outlook. More information: Microsoft Customer Experience Improvement Program

User credentials are required when you run the Configuration Wizard

The Configuration Wizard requires user credentials. During a silent configuration, by using /Q with the Microsoft.Crm.Application.Outlook.ConfigWizard.exe file, the Configuration Wizard will look for the user’s credentials in the Windows Vault. If the Configuration Wizard can’t find the credentials, or the credentials aren’t in the required format, the configuration will not finish and an error will be recorded to the configuration log file. Notice that the Configuration Wizard doesn’t support adding the user UPN or password in the XML configuration file. For more information about the Windows Vault and Credential Manager, see What is Credential Manager

Sample Dynamics 365 for Outlook XML configuration file for configuration

The following configuration file example configures Dynamics 365 for Outlook to connect to a primary organization named Contoso and another organization named AdventureWorksCycle on the Dynamics 365 Server that is named crmserver.

Note

You can use the same file that includes both the installation and configuration elements. Setup and the Configuration Wizard will ignore the elements that aren’t relevant to the operation.

Example Default_Client_Config.xml file

<Deployments>
<Deployment>
<DiscoveryUrl>https://crmserver</DiscoveryUrl>
<Organizations>
<Organization IsPrimary='true'>Contoso</Organization>
<Organization>AdventureWorksCycle</Organization>
</Organizations>
<CEIPNotification>false</CEIPNotification>
</Deployment>
</Deployments>

Note

The preceding example specifies two different organizations that the user has access to and configures Dynamics 365 for Outlook to not display the “I want to join the Customer Experience Improvement Program” notification banner. The value in the Organization element can’t contain special characters or spaces. For Customer Engagement (on-premises), you can find the organization unique name by running the Get-CrmOrganization Windows PowerShell cmdlet or go to Settings > Customizations > Developer Resources and under Instance Reference Information copy the Unique Name.

Configure Dynamics 365 for Outlook by using a script

  1. Write a script that automatically updates the configuration settings for users of Dynamics 365 for Outlook. You could use lines such as the following to perform the basic configuration actions, based on a new configuration file that is stored on the computer indicated as <servername>.

    In the following script, the default client configuration file is overwritten, previously configured organizations are removed, user credentials are added to the Windows Vault, and the new organization is installed.

    copy /y \\<servername>\share\Default_Client_Config.xml "c:\Program Files\Microsoft Dynamics CRM\Default_Client_Config.xml"
    "C:\Program Files\Microsoft Dynamics CRM\Client\ConfigWizard\Microsoft.Crm.Application.Outlook.ConfigWizard.exe" /q /xa
    cmdkey /generic:Microsoft_CRM_https://disco.crm.dynamics.com/ /user:user@contoso.com /password{password_goes_here}
    "C:\Program Files\Microsoft Dynamics CRM\Client\ConfigWizard\Microsoft.Crm.Application.Outlook.ConfigWizard.exe" /q /i
    "C:\Program Files\Microsoft Dynamics CRM\Default_Client_Config.xml"
    

    Tip

    Consider running your script as a logon script, or forcing the script to run at a specific time, such as by using Microsoft System Center 2012 Configuration Manager.

    In the script, you might also want to include detection logic that determines whether the client computer has already been configured. If it has, you can have the script exit without taking action.

    Example Default_Client_Config.xml file

    <Deployment>
    <DiscoveryUrl>https://CrmDiscoveryUrl</DiscoveryUrl>
    <Organizations>
    <Organization IsPrimary='true'>Organization1</Organization>
    </Organizations>
    </Deployment>
    
  2. Run the script on each client computer in the organization whose server has changed. You can run the script in various ways, including through the Profile tab of the user properties dialog box in Active Directory Users and Computers (ADUC), or through Group Policy Objects (GPO).

See Also

Install Dynamics 365 for Outlook