Fix: Unable to find package provider NuGet on Windows Server 2016

Just recently I got a task to migrate Sitecore 9.0 – Update 1 website to Sitecore 9.3 – Initial version. For this purpose, first I needed to setup the Sitecore 9.0 – Update 1 site on local system. I used Windows Server 2016 Version 1607 (OS Build 14393, 1884).

I started by installing the SIF according to the installation guide. And on the first instance I encountered the following error, while registering the SitecoreGallery registry.

PackageManagement\Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 
'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7405 char:21
+ ...     $null = PackageManagement\Install-PackageProvider -Name $script:N ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-PackageProvider], Exception
    + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider

Now what?

After exploring few articles and forums, I got one answer which I tried.

I executed following command to enable use of TLS12 on Windows Server 2016.

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

And then tried registering the repository again.

Hope this article will save time for others!!!!