Monday 28 September 2020

Download Plugin Registration Tool using PowerShell - Dynamics 365 CE

Hi Everyone,

Here are the steps to download Dynamics 365 CE Plugin Registration Tool via PowerShell.

1) Type Windows Powershell in windows start menu and open it.
2) Navigate to the folder where you would like download the tool.

3) Copy and paste the following PowerShell script into the PowerShell window and press Enter.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$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 .\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

4) You will see the Tool at the given path.

Hope this helps.

--
Happy 365'ing
Gopinath.

No comments:

Post a Comment