Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time

Adoxio.Dynamics.DevOps

Adoxio.Dynamics.DevOps is a PowerShell module for performing DevOps activities for Dynamics 365 CE.

This project is no longer actively maintained. Read below for alternative options to the functions within this project.

See the CrmDataPackager project for updated versions of these functions:

  • Compress-CrmData
  • Expand-CrmData

See the Microsoft Power Platform Build Tools tasks for alternatives to these functions:

  • Compress-CrmSolution
  • Expand-CrmSolution
  • Export-CrmSolutions
  • Invoke-ImportCrmPackage
  • Remove-CrmOrganization
  • Remove-CrmRemoteOrganization
  • Restore-CrmOrganization
  • Restore-CrmRemoteOrganization

Contact Alan Mervitz if there's interest in continued use of these functions:

  • Edit-CrmSchemaFile
  • New-AppSourcePackage
  • New-CrmPackage

Installation for Dynamics 365 v9.x

  • Open Windows PowerShell and install the module from the PowerShell Gallery
    Install-Module -Name Adoxio.Dynamics.DevOps -Scope CurrentUser
  • Download and install the Dynamics 365 v9.x SDK
  • Create an environment variable named CRM_SDK_PATH and set it to the folder path of the downloaded tools. The folder path to use is the Tools folder containing the ConfigurationMigration, CoreTools, PackageDeployment, and PluginRegistration folder. This can be done in PowerShell by executing this code:
    [Environment]::SetEnvironmentVariable("CRM_SDK_PATH", "C:\Path\To\Tools", "User")
  • Restart PowerShell for the new environment variable to take effect

Installation for Dynamics 365 v8.x

Walkthrough instructions are available in the blog post Installing Adoxio.Dynamics.DevOps.

An abbreviated version is as follows:

  • Open Windows PowerShell and install the module from the PowerShell Gallery
    Install-Module -Name Adoxio.Dynamics.DevOps -Scope CurrentUser
  • Download and install the Dynamics 365 v8.x SDK
  • Create an environment variable named CRM_SDK_PATH and set it to the folder path of the extracted Dynamics 365 SDK folder on your computer. The folder path to use is the SDK folder containing the Bin, Resources, SampleCode, Schemas, Templates, and Tools folders. This can be done in PowerShell by executing this code:
    [Environment]::SetEnvironmentVariable("CRM_SDK_PATH", "C:\Path\To\SDK", "User")
  • Restart PowerShell for the new environment variable to take effect

Functions

This module includes the following functions that can be used individually to implement tailored scripting needs.

Compress-CrmData

Packs and zips a folder of Configuration Migration tool generated files previously created from the Expand-CrmData cmdlet.

Compress-CrmSolution

Packages an unpacked CRM solution folder using the SolutionPackager tool.

Edit-CrmSchemaFile

Modifies a Configuration Migration tool schema file to control the list of entities and fields that are included during an export, and the settings to use when importing the records using the Configuration Migration tool and Package Deployer.

Expand-CrmData

Extracts a Configuration Migration tool generated zip file and unpacks the .xml files into separate files and folders, where each entity is stored in its own folder and each record is stored in its own .xml file inside the entity folder.

Expand-CrmSolution

Extracts a CRM solution file to its individual components using the SolutionPackager tool included in the Dynamics 365 SDK.

Export-CrmSolutions

Exports a list of solutions from a CRM organization.

Invoke-ImportCrmPackage

Imports a package to a Microsoft Dynamics CRM instance.

New-AppSourcePackage

Creates an AppSource package.

New-CrmPackage

This function creates a package for use with the Dynamics CRM Package deployer included in the Dynamics 365 SDK.

Remove-CrmOrganization

Deletes an existing on-premise CRM organization from a local CRM server.

Remove-CrmRemoteOrganization

Deletes an existing on-premise CRM organization from a remote CRM server.

Restore-CrmOrganization

Creates a new on-premise CRM organization on a local CRM server by restoring from a backup.

Restore-CrmRemoteOrganization

Creates a new on-premise CRM organization on a remote server by restoring from a backup.

Prescriptive Scripting Usage

This project includes prescriptive samples for defining a series of actions that manage the full lifecyle of exporting and importing customizations and data from Dynamics 365 organizations. The samples are a combination of declaritive configuration files and scripts that use the configuration files to execute exports and imports.

Walkthrough instructions are available in the following blog posts:

An abbreviated version is as follows:

  • Copy and rename the samples/Advanced folder from this project to the root of your own project with the name scripts
  • Edit or create files inside the CrmConnectionParameters, ExportSettings and ImportSettings folders to describe the environments, solutions, and data that will be used during exports and imports
  • Update the parameters at the top of the Export.ps1 and Import.ps1 files to refer to the file names used in the previous step
  • Invoke the Export.ps1 and Import.ps1 scripts to execute exports and imports

Project Development

To load this project for making changes to the PowerShell module and samples, ensure that you have Git installed to obtain the source code, and Visual Studio 2017 with the PowerShell Tools for Visual Studio 2017 extension to easily view and edit the code.

  • Clone the repository using Git:
    git clone https://github.com/Adoxio/Adoxio.Dynamics.DevOps.git
  • Open the Adoxio.Dynamics.DevOps.sln solution file in Visual Studio

Project Structure

The primary folders in this repository are:

Support

Support is available by submitting issues to this GitHub project.

License

This project uses the MIT license.

Contributions

This project accepts community contributions through GitHub, following the inbound=outbound model as described in the GitHub Terms of Service:

Whenever you make a contribution to a repository containing notice of a license, you license your contribution under the same terms, and you agree that you have the right to license your contribution under those terms.

Please submit one pull request per issue so that we can easily identify and review the changes.