Categories
Coding

PackageManagement\Install-Package : No match was found…

As ever, creating this note as a reminder and to save me trawling Google the next time the problem occurs.

When attempting to install a PowerShell module and the following error happens…

PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'AzureAD'. Try Get-PSRepository to see all available registered module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21

… it can be resolved by running this command.

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