Menu Close

Microsoft Dynamics 365 SDK download using Powershell

Hello Everyone,

Normally we download the Microsoft dynamics CRM SDK from Microsoft  website until Microsoft Dynamics 365 version 9.0.

From Version 9.0 we have two options to download the SDK

1) Using the visual studio Nuget package manager

Manage NuGet Packages command for project References

2)  using the Powershell:

I am gonna show how  to download it on to the local folder.

First create a folder in your local computer
Drive : D
Folder: Tool

So the path would be D:/Tools

Search for the “Powershell” on your computer start menu..
Change the directory to desired directory using cd..
  cd D:Tools

Copy the powershell script from Microsoft website

$sourceNugetExe = “https://dist.nuget.org/win-x86-commandline/latest/nuget.exe”
$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 .ToolsPluginRegistration
$prtFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match ‘Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool.’}
move .Tools$prtFoldertools*.* .ToolsPluginRegistration
Remove-Item .Tools$prtFolder -Force -Recurse

##
##Download CoreTools
##
./nuget install  Microsoft.CrmSdk.CoreTools -O .Tools
md .ToolsCoreTools
$coreToolsFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match ‘Microsoft.CrmSdk.CoreTools.’}
move .Tools$coreToolsFoldercontentbincoretools*.* .ToolsCoreTools
Remove-Item .Tools$coreToolsFolder -Force -Recurse

##
##Download Configuration Migration
##
./nuget install  Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf -O .Tools
md .ToolsConfigurationMigration
$configMigFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match ‘Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf.’}
move .Tools$configMigFoldertools*.* .ToolsConfigurationMigration
Remove-Item .Tools$configMigFolder -Force -Recurse

##
##Download Package Deployer
##
./nuget install  Microsoft.CrmSdk.XrmTooling.PackageDeployment.WPF -O .Tools
md .ToolsPackageDeployment
$pdFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match ‘Microsoft.CrmSdk.XrmTooling.PackageDeployment.Wpf.’}
move .Tools$pdFoldertools*.* .ToolsPackageDeployment
Remove-Item .Tools$pdFolder -Force -Recurse

##
##Remove NuGet.exe
##
Remove-Item nuget.exe

Then you can see on the screen shot SDK will be downloaded to the local folder:
As you can see the plugin registration tool, package deployment, CoreTools, ConfigurationMigration folder from  the image.
Then you start using the SDK for the development work.
I hope this helps..
SMB’s and Enterprise Customers need of Support/Development/Consultancy/Licenses 
Contact us 

Share this:
Posted in Blog

Related Posts