Back to Basics # 8: Download Dynamics CRM Tools Using Power Shell

Introduction:

In Dynamics 365 CRM or Power Platform, certain tools like Configuration Migration Tool,Package Deployer,Plug-in Registration Tool ,Solution Packager tool and Code Generation Tool are required for every project development. By using the following process one can easily set up to work readily in few minutes.

Step 1:

Navigate to Windows Explorer and type Windows Power Shell as shown in the below figure.

Step 2 :

Click on open as shown below figure

Step 3:  

After Step 2, click on open, new popup will get opened as shown below

Step 4:

Create directory by using the following command , here in this example I gave directory[Folder] name as devtools and click on enter devtools folder gets created as shown below

Syntax : mkdir <FolderName>

Example : mkdir devtools

Step 5 :

After Step 4, new folder with name devtools gets created. Now go to that folder with the below command  as shown in below figure

Syntax : cd <FolderName>

Ex: cd devtools

Step 6:

Now copy below power shell script and paste it in the above window and click on enter key in keyboard or just paste it  as shown in the following figure below.

Code:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$sourceNugetExe = “https://dist.nuget.org/win-x86-commandline/latest/nuget.exe&#8221;

$targetNugetExe = “.\nuget.exe”

Remove-Item .\Tools -Force -Recurse -ErrorAction Ignore

Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe

Set-Alias nuget $targetNugetExe -Scope Global -Verbose

##

##Download Plugin Registration Tool

##

./nuget install Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool -O .\Tools

md .\Tools\PluginRegistration

$prtFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match ‘Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool.’}

move .\Tools\$prtFolder\tools\*.* .\Tools\PluginRegistration

Remove-Item .\Tools\$prtFolder -Force -Recurse

##

##Download CoreTools

##

./nuget install  Microsoft.CrmSdk.CoreTools -O .\Tools

md .\Tools\CoreTools

$coreToolsFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match ‘Microsoft.CrmSdk.CoreTools.’}

move .\Tools\$coreToolsFolder\content\bin\coretools\*.* .\Tools\CoreTools

Remove-Item .\Tools\$coreToolsFolder -Force -Recurse

##

##Download Configuration Migration

##

./nuget install  Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf -O .\Tools

md .\Tools\ConfigurationMigration

$configMigFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match ‘Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf.’}

move .\Tools\$configMigFolder\tools\*.* .\Tools\ConfigurationMigration

Remove-Item .\Tools\$configMigFolder -Force -Recurse

##

##Download Package Deployer

##

./nuget install  Microsoft.CrmSdk.XrmTooling.PackageDeployment.WPF -O .\Tools

md .\Tools\PackageDeployment

$pdFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match ‘Microsoft.CrmSdk.XrmTooling.PackageDeployment.Wpf.’}

move .\Tools\$pdFolder\tools\*.* .\Tools\PackageDeployment

Remove-Item .\Tools\$pdFolder -Force -Recurse

##

##Download Package Deployer PowerShell module

##

./nuget install Microsoft.CrmSdk.XrmTooling.PackageDeployment.PowerShell -O .\Tools

$pdPoshFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match ‘Microsoft.CrmSdk.XrmTooling.PackageDeployment.PowerShell.’}

move .\Tools\$pdPoshFolder\tools\*.* .\Tools\PackageDeployment.PowerShell

Remove-Item .\Tools\$pdPoshFolder -Force -Recurse

##

##Remove NuGet.exe

##

Remove-Item nuget.exe

Step 7:

Now navigate to the folder devtools that was created in step 4 and you could see a folder with name Tools and open that Tools folder to see subfolders where we can find separate folders for Configuration Migration ,Core Tools,PackageDeployment,PackageDeployment.PowerShell and Plugin Registration  folders gets created as shown below.

Step 8:

Now to test whether the tools are working fine or not , open Configuration Migration folder and click on DataMigrationUtility.exe as shown below figure.

Step 9:

After Step 8, new popup window of DataMigration utility get’s opened, click on Create Schema and click on continue as shown below figure

Step 10:

After Step 9, click on continue . User will be navigated to next screen . Select office 365 option and select on Display list of available organizations and click on Login as shown below figure

Step 11:

After login in Step 10, provide credentials for crm login it could be trial instance/ dev environment user name and password and user will be navigated to the below screen and could see entities gets populated as shown below which confirms tool installed properly.

References :

https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/download-tools-nuget?view=op-9-1

Conclusion:

In this way ,one can easily get CRM tools that are required for development with less time and ready to use tools readily.

7 thoughts on “Back to Basics # 8: Download Dynamics CRM Tools Using Power Shell

  1. Pingback: Back to Basics # 9: Prepare Dynamics D365 CRM Data File using Data Migration Utility – Common Man Tips for Power Platform, Dynamics CRM,Azure

  2. Pingback: Back to Basics # 10: Import Data File into Dynamics D365 Environment using Data Migration Utility – Common Man Tips for Power Platform, Dynamics CRM,Azure

  3. Pingback: Back to Basics # 10: Import Data File into Dynamics D365 Environment using Data Migration Utility - Microsoft Dynamics CRM Community

  4. Pingback: Back to Basics # 11: Generate Early Bound Class File with Code Generation Tool in Dynamics 365 CRM – Common Man Tips for Power Platform, Dynamics CRM,Azure

  5. Pingback: Back to Basics # 11: Generate Early Bound Class File with Code Generation Tool in Dynamics 365 CRM - Microsoft Dynamics CRM Community

  6. Pingback: Back to Basics # 12: Deploy Packages using Package Deployer Tool in Dynamics 365 CRM – Common Man Tips for Power Platform, Dynamics CRM,Azure

  7. Pingback: Back to Basics # 12: Deploy Packages using Package Deployer Tool in Dynamics 365 CRM - Microsoft Dynamics CRM Community

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s