JavaScript Required

We're sorry, but we doesn't work properly without JavaScript enabled.

How To – Using PowerShell to export and import Microsoft Dynamics 365 CE \ CRM Solution from one instance to another

With Microsoft.Xrm.Data.PowerShell extensions we can easily export Dynamics CRM Solution from one instance and import to another instance without opening up the Dynamics 365 Web Application. This can be automated and scheduled as part of DevOps.

Crm Developer

Pre-requisite

  • Dynamics 365 Instance
  • System Customizer or System Administrator or similar roles in the Dynamics 365 Instance
  • PowerShell x64 version 4.0 or above

You can download the latest version from the below location

https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell/releases/

identify customers

Extract the content after downloading the zip file at the following location. Make sure to Unblock the zip before extracting.

microsoft xrm data powershell

%WINDIR%\System32\WindowsPowerShell\v1.0\Modules

Launch the PowerShell console to import the module as shown below

powerShell console

Next run the below command to connect to your CRM Instance

poweshall command

After successful login, you will get the details of the organization connected

powershell successful login

Now run the following command to export the solution

Replace “Test” with the name of the solution to be exported.

powershell command

After successful run of the command, you can see the result as shown below

command run
commandrun

Different parameters that can be used with the Export-CrmSolution command

crmsolution command

Now to import the solution first connect to the instance to which you would like to import the solution

crm solution commands

Followed by Import-CrmSolution command as shown below

import crmsolution command

Different parameters of the Import-CrmSolution command

parameters of the import crmsolution

In this article, Microsoft Dynamics CRM Developers guide to how we can combine both the Export-CrmSolution and Import-CrmSolution command to easily export and import the solution from one environment to another thus enabling the continues integration (CI) Devops automation.