o365soa/soa

Documentation on PowerShellGet Requirement

Closed this issue · 1 comments

Hi,

Just want to add some text in the documentation on PowerShellGet Module, where newcomers on PowerShell may have some difficulties.

On the following text :

PowerShellGet version 2.2.4 or higher
As of April 2020, PowerShell Gallery supports only TLS 1.2. While PowerShell and Windows support TLS 1.2, in some proxy environments the proxy server might negotiate a lower version, which will cause a Resource Unavailable error when attempting to install any module from PowerShell Gallery. PowerShellGet 2.2.4 works around this issue by temporarily forcing TLS 1.2 when installing any module from PowerShell Gallery and then changing back to the OS default. If at least PowerShellGet 2.2.4 is not installed, run the following to install the latest version:

I think it would be helpful to add the following commands to help:
Install-Module PowerShellGet -force -AllowClobber
get-module powershellget | ? {$_.version -notmatch "2."} | Remove-Module

Step added to remove PSGet from current session.