Install Module MSOnline

Module MSOnline – NuGet Provider is required to continue

Install-Module MSOnline

Wenn beim Versuch die Meldung erscheint, das der Nuget Provider benötigt bzw. nicht vorhanden ist, dann sind nicht alle Voraussetzungen für die Installation geschaffen.

Module MSOnline – NuGet Provider is required to continue

Unterhalb des Menüs findet ihr die entsprechende Vorgehensweise.

NuGet Provider is required to continue

# Wir haben vor dieses Modul (MSOnline) zu installieren
Install-Module MSOnline

# Folgende Meldung erscheint “NuGet Provider is required to continue”
Wir bestätigen die Frage “Do you want PowershellGet to Install and Import the NuGet provider now?” mit “Y”

# Folgende Fehlermeldung erscheint
WARNING: Unable to Download from URI ‘https://go.microsoft.com/fwlink/?LinkID=xxxxx’
WARNING: Unable to Download the List of available Providers. Check your Internet Connection.

# Auch wenn wir versuchen den NuGet Provider manuell zu installieren, erscheint der Warnhinweis und stehen wieder am Anfang.
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force

NuGet Provider manuell zu installieren

# Das Problem wird vermutlich eine falsche TLS Konfiguration sein. Ist das Ergebnis TLS,TLS11…
[Net.ServicePointManager]::SecurityProtocol

Module MSOnline - NuGet Provider is required to continue

# Dann ist die Lösung .NET auf TLS 1.2 zu konfigurieren
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Install-Module MSOnline

Ab der .NET Version 4.7 lautet die Standardeinstellung nämlich SecurityProtocolType.SystemDefault. Wenn das System selbst nicht auf TLS 1.2 konfiguriert ist, dann kann das auch nicht funktionieren.

Powershell Untrusted Repository