Installing CRM 2011 via Command Line and XML Config File

Here’s the first place you need to look: http://technet.microsoft.com/en-us/library/gg554834.aspx

Have a read of the content there to get a feel for this process.  BUT do not use the sample file provided, it has a few typos that will annoy the hell out of you, read on instead…

My scenario:

  • Single server install (server name = VBOX1, domain name = GTDOMAIN)
  • I have already created an OU in the AD called “CRM” and will have the installer create the CRM AD groups in that folder
  • I have SQL installed and SSRS configured all good to go
  • I am just going to install the CRM 2011 Server
    You will need either the CRM server installer (CRM2011-Server-ENU-amd64.exe) available here or the CRM install media.  If you have the CRM server installer run the exe to extract the install files.  If you have the install media then I think the install files are already extracted out.

To execute the actual install open a command prompt and navigate to the CRM installation folder that contains SetupServer.exe:

Type a command line similar to the below:

SetupServer.exe /QR /L C:\CRMTEMP\server_install_log.log /config C:\CRMTEMP\server_install_config.xml

Place your config file in the folder specified, and make sure the name matches up.

You can use either /QR or /Q.   The “R” gives you visibility of progress and errors.

When you run the above statement the command prompt will simply accept it and clear the prompt, leaving you wondering what went wrong:

image

If you check Task Manager you should see Microsoft.Crm.Setup.Server.exe doing its thing:

image

If you want more visibility of what’s going on drop the /QR from the command line.   You will see each installation step, with the screens pre-populated based on the config file, but will need to click through each screen to nudge the process along.   Handy for troubleshooting.

If the installer fails check the log file, I found it clearly pointed out the environmental issues that I needed to address (like forgetting to create the OU and not having SQL full text search installed).

Here’s my config file:

<CRMSetup> 
    <Server> 
        <Patch update="true"></Patch> 
        <LicenseKey>MQM2H-JYYRB-RRD6J-8WBBC-CVBD3</LicenseKey> 
        <SqlServer>VBOX1</SqlServer> 
        <Database create="true"/> 
        <Reporting URL="http://VBOX1/ReportServer"/> 
        <OrganizationCollation>Latin1_General_CI_AI</OrganizationCollation> 
        <basecurrency isocurrencycode="SGD" currencyname="Singapore Dollar" currencysymbol="$" currencyprecision="2"/> 
        <Organization>Test Company</Organization> 
        <OrganizationUniqueName>TestCompany</OrganizationUniqueName> 
        <OU>OU=CRM,DC=GTDOMAIN,DC=COM</OU> 
        <WebsiteUrl create="true" port="5555"> </WebsiteUrl> 
        <InstallDir>c:\Program Files\Microsoft Dynamics CRM</InstallDir> 
        <CrmServiceAccount type="DomainUser"> 
            <ServiceAccountLogin>GTDOMAIN\administrator</ServiceAccountLogin> 
            <ServiceAccountPassword>pass@word1</ServiceAccountPassword> 
        </CrmServiceAccount> 
        <SandboxServiceAccount type="DomainUser"> 
            <ServiceAccountLogin>GTDOMAIN\administrator</ServiceAccountLogin> 
            <ServiceAccountPassword>pass@word1</ServiceAccountPassword> 
        </SandboxServiceAccount> 
        <DeploymentServiceAccount type="DomainUser"> 
            <ServiceAccountLogin>GTDOMAIN\administrator</ServiceAccountLogin> 
            <ServiceAccountPassword>pass@word1</ServiceAccountPassword> 
        </DeploymentServiceAccount> 
        <AsyncServiceAccount type="DomainUser"> 
            <ServiceAccountLogin>GTDOMAIN\administrator</ServiceAccountLogin> 
            <ServiceAccountPassword>pass@word1</ServiceAccountPassword> 
        </AsyncServiceAccount> 
        <SQM optin="true"/> 
        <mu option="true"/> 
        <Email> 
            <IncomingExchangeServer name="VBOX1"/> 
        </Email> 
        </Server> 
</CRMSetup>

Some notes on the config file…

PATCH – I have Patch update set to true, this will force the installer to check for an updated install files online.  If you don’t have an internet connection either set this to false, or leave it on true but add a path to a local folder that contains the install updates.  Check out these posts for more details on this:

About the “Patch” option:  http://technet.microsoft.com/en-us/library/gg554688.aspx

How to get an MSP file:  http://support.microsoft.com/kb/2434455

AsyncServiceAccount – The Microsoft supplied sample found on technet has a typo here. 

mu option="true"  – Again, Microsoft has another typo.

IncomingExchangeServer – whether using Exchange or not make sure an actual server name is entered here (I entered the name of the server I was installing CRM on).  If the installer can’t find the server the install won’t proceed.

OU – I have manually created an Organizational Unit in the AD called “CRM” prior.  Make sure your AD OU is created before you attempt the install:

image

Everything else should be pretty obvious.

In my scenario I am using a domain admin account on a single server environment (DC, CRM, SQL) so security was easy peasy.   If your environment is a little more complex then you’ll need to have a read of this blog: 

http://blogs.msdn.com/b/darrenliu/archive/2011/04/27/minimum-permissions-required-for-dynamics-crm-2011-setup-services-and-components.aspx

That will get you started.  There’s the email router, SRS data connector, rollup packs etc to do as well.   Good luck!

The config file is available for download here.

Depending upon your environment some of the prerequisites auto-installed by the CRM installer may need to be manually installed prior to executing the command line install to enable success.  This is due to restarts being required in between installation of certain  prerequisites.   The log file provides clarity around this when it happens.

1 thought on “Installing CRM 2011 via Command Line and XML Config File

  1. Pingback: Building a Microsoft CRM VM on Windows Server 2012 | Gareth Tucker's Microsoft CRM Blog

Leave a comment