When I tried to use PnP PowerShell with just the basic connection, I’ve got errors immediately with Windows 11. Why it happened – I don’t know, but I do how to fix it.
The solution consists of 4 steps:
1. Uninstall all versions PnP PowerShell
Uninstall-Module PnP.PowerShell -AllVersions
2. Set Tls12 protocol
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
3. Install Nuget
Install-PackageProvider -Name nuget -MinimumVersion 2.8.5.201 -force
The result is smth like this:
Name Version Source Summary
—- ——- —— ——-
nuget 2.8.5.208 https://onege… NuGet provider for the OneGet meta-package manager
4. Install PnP.PowerShell
Install-Module -Name “PnP.PowerShell” -RequiredVersion 1.12.0 -Force -AllowClobber
Leave a Reply