locked
CRM4 Command line tools. RRS feed

  • Question

  • Are there any other command line tools like the Microsoft.Crm.DeploymentConfigTool.exe one?

    I’m wondering if it would be possible to add a New Deployment via a script.

     

    thx

     

     

    Friday, January 18, 2008 1:05 PM

Answers

  • Hi Sean,

    You can create a small application which will create a new deployment. This small application you can configure to be executed by script. The main piece of you small application is described by Jagan Peri on the Microsoft team blog: http://blogs.msdn.com/crm/archive/2008/01/18/multi-tenancy-in-crm-4.aspx

    Here's a copy of the interesting piece:

    Programatically thru’ the CrmDeploymentService.asmx (http://<crmserver>/MSCRMServices/2007/CrmDeploymentService.asmx ).

    The code snippet below assumes you have generated a proxy against the above web service.

    First, create an instance of Organization class and specify properties of the organization you want to create.

    Organization myOrg = new Organization();

    myOrg.UniqueName = "TestOrg";

    myOrg.FriendlyName = "Display Name for TestOrg";

    myOrg.SqlServerName = "testsql"; // Replace this with the name of your sql server.

    myOrg.SrsUrl = "http://localhost/ReportServer"; // Replace this with the name of your SRS Server URL.

    myOrg.BaseCurrencyCode = "USD";

    myOrg.BaseCurrencyName = "US Dollar";

    myOrg.BaseCurrencySymbol = "$";

    Next, create an instance of the CrmDeploymentService proxy and execute the CreateRequest on it. Provisioning a new organization can take some time, so be sure to override the default timeout to a reasonably high value.

    CrmDeploymentService deploymentService = new CrmDeploymentService();

    deploymentService.Timeout = 10 * 60 * 1000; // 10 minutes.

    CreateRequest request = new CreateRequest();

    request.Entity = myOrg;

    CreateResponse response = (CreateResponse)deploymentService.Execute(request);


    With kind regards,

    Ronald Lemmen
    Microsoft Dynamics CRM MVP
    http://www.ronaldlemmen.com
    Sunday, March 22, 2009 11:43 AM
    Moderator

All replies

  • Hi Sean,

     

    Yes, you can do it. Take a look at CRM 4.0 installation guide:

     

    Cheers,

    Jim

     

     

     

    Install Microsoft Dynamics CRM Server

    The following command will install Microsoft Dynamics CRM Server:

     

    SetupServer.exe [/Q] [/InstallAlways] [/L [drive:][[path] logfilename.log]] [/config [drive:] [[path] configfilename.xml]]

     

    SetupServer.exe for Microsoft Dynamics CRM Server is located in the root of the Microsoft Dynamics CRM Server installation disk or download-files location.

    Parameters

    None

    Used without parameters, Setup will install with all display screens.

     

    /Q

    Quiet mode installation. This parameter requires a configuration file in XML format. The /config 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).

    /InstallAlways

    This parameter forces Setup to ignore the installation state and operate in install mode. When you use this parameter, Setup will try to install on a server where Microsoft Dynamics CRM is already installed.

    /QR

    Requires a configuration file in XML format specified by the /config parameter. Displays installation progress bars and all error messages.

    /L [drive:][[path] logfilename.log]]

    Creates a log file of installation activity. You can specify the file name of the log file and where to put it. If you do not specify a name or location, a log file will be created in the Drive:\Documents and Settings\\UserName\Application Data\Microsoft\MSCRM\Logs folder, where UserName is the account name of the user running Setup. The following options are available:

    /LV  Log verbose.

    /L*   Log all information except verbose.

    /L*V Log all information including verbose.

    /config [drive:] [[path] configfilename.xml]]

    The /config parameter uses the specified XML configuration file to provide Setup with the additional information to complete installation successfully. An example XML configuration file is discussed in the following section.

    Sunday, January 20, 2008 11:17 AM
    Moderator
  •  

    Actually what I am looking for is a way to use the deployment managers features from the command line.

     

    IE: New Org Wizard.

    Monday, January 21, 2008 1:29 PM
  • see this http://blogs.msdn.com/crm/archive/2008/01/18/multi-tenancy-in-crm-4.aspx

     

    Use Deployment manager to create a new organization (All Programs -> Microsoft CRM -> Deployment Manager). You need to be a member of Deployment Administrators group to run this tool. The user who installed CRM is added as a member of this group automatically. Deployment manager will collect information such as name of the organization, currency settings, sql server etc and create a new organization.

     

    Use the netdom command to show where your machine is pointing for Ldap

     

    Regards,

    Imran

     

    http://microsoftcrm3.blogspot.com

     

    Tuesday, January 22, 2008 7:06 AM
    Moderator
  • Hi Sean,

    You can create a small application which will create a new deployment. This small application you can configure to be executed by script. The main piece of you small application is described by Jagan Peri on the Microsoft team blog: http://blogs.msdn.com/crm/archive/2008/01/18/multi-tenancy-in-crm-4.aspx

    Here's a copy of the interesting piece:

    Programatically thru’ the CrmDeploymentService.asmx (http://<crmserver>/MSCRMServices/2007/CrmDeploymentService.asmx ).

    The code snippet below assumes you have generated a proxy against the above web service.

    First, create an instance of Organization class and specify properties of the organization you want to create.

    Organization myOrg = new Organization();

    myOrg.UniqueName = "TestOrg";

    myOrg.FriendlyName = "Display Name for TestOrg";

    myOrg.SqlServerName = "testsql"; // Replace this with the name of your sql server.

    myOrg.SrsUrl = "http://localhost/ReportServer"; // Replace this with the name of your SRS Server URL.

    myOrg.BaseCurrencyCode = "USD";

    myOrg.BaseCurrencyName = "US Dollar";

    myOrg.BaseCurrencySymbol = "$";

    Next, create an instance of the CrmDeploymentService proxy and execute the CreateRequest on it. Provisioning a new organization can take some time, so be sure to override the default timeout to a reasonably high value.

    CrmDeploymentService deploymentService = new CrmDeploymentService();

    deploymentService.Timeout = 10 * 60 * 1000; // 10 minutes.

    CreateRequest request = new CreateRequest();

    request.Entity = myOrg;

    CreateResponse response = (CreateResponse)deploymentService.Execute(request);


    With kind regards,

    Ronald Lemmen
    Microsoft Dynamics CRM MVP
    http://www.ronaldlemmen.com
    Sunday, March 22, 2009 11:43 AM
    Moderator