
Quick Fix for Downloading Power Apps SDK Tools
Recently I was attempting to download the Dynamics 365 / Power Apps / CDS / Data Flex SDK tools from Nuget and getting an annoying error when running the standard PowerShell scripts to do so according to the documentation.
The error wasn’t really specific, but a quick Google search did lead to a solution on Stack Overflow if you ever have the same problem.
The error was as follows.

The issue as noted in the Stack Overflow thread was that PowerShell uses TLS 1.0 by default and TLS 1.2 is required to connect. So the solution is simple. Instead of the following commands. Which come directly from the Microsoft Docs.
$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
Prepend the following and you’re good to go…
[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
Just a simple fix that will save you a Google search for the error.