Azure Microsoft Powershell

Installing AzureAD PowerShell Module

NuGet Provider, AzureAD and TLS 1.2

When I was trying to install the AzureAD PowerShell module, I was told that “NuGet provider is required to continue”, and was getting an error message saying that no match was found for the specified search criteria for the provider ‘Nuget’

Install-Module AzureAD -Verbose

I then tried to install the NuGet package provider

Install-PackageProvider -Name “NuGet” -Verbose

It appears that .NET Framework needs to support TLS 1.2 to successfully download the NuGet Package provider. 

In a real-world scenario, you should follow this guide to configure .NET Framework to support TLS 1.2.

Since I am only doing this in my home Lab, I will use a workaround to force PowerShell cmdlet to use TLS 1.2

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

After doing so, I tried to Install-PackageProvider and Install-Module again, and was finally able to install them.

Install-PackageProvider -Name “NuGet” -Verbose
Install-Module AzureAD -Verbose

Leave a Reply

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

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

Facebook photo

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

Connecting to %s