How to install the latest version of powershellget module

cloud blog center

PowerShellGet is a module with commands for discovering, installing, updating and publishing PowerShell artifacts like Modules, DSC Resources, Role Capabilities, and Scripts.

Step1: Set TLS1.2 as default protocol in the PS Session

As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. If you are not using TLS 1.2 or higher, you will receive an error when trying to access the PowerShell Gallery. Use the following command to ensure you are using TLS 1.2:

Step 2: Before updating PowerShellGet, you should always install the latest NuGet provider. From an elevated PowerShell session, run the following command.

Step 3: Register PS repositories if not setup before

If you see an exception like Powershell Gallery is currently unavailable, register PSGallery as default

Step 4: Install PowerShellGet

Use Update-Module to get newer versions.

View original post

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 )

Twitter picture

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

Facebook photo

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

Connecting to %s