With Microsoft.Xrm.Data.PowerShell extensions we can easily export Microsoft Dynamics CRM Development Solutions 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 consulting.
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/
Extract the content after downloading the zip file at the following location. Make sure to Unblock the zip before extracting.
%WINDIR%\System32\WindowsPowerShell\v1.0\Modules
Launch the PowerShell console to import the module as shown below
We specialize in completing this task using PowerShell extensions.
Next run the below command to connect to your CRM Instance
After successful login, you will get the details of the organization connected
Now run the following command to export the solution
Replace “Test” with the name of the solution to be exported.
After successful run of the command, you can see the result as shown below
Different parameters that can be used with the Export - Crm Solution command
Now to import the solution first connect to the instance to which you would like to import the solution
Followed by Import- Crm Solution command as shown below
Different parameters of the Import – Crm Solution command
Conclusion
In this article, Microsoft Dynamics CRM Developers guide to how we can combine both the Export - Crm Solution and Import – Crm Solution command to easily export and import the solution from one environment to another thus enabling the continues integration (CI) Devops automation.