How it works...

In step 1, you start by reviewing the cmdlets in the PowerShellGet module:

In steps 2-7, you ensure PowerShellGet and its dependency PackageManagement are up to date by updating the NuGet provider, verifying the version, then restarting your PowerShell session and updating PowerShellGet and verifying its version.

The -Verbose flag gives you more details on the installation, but it is not required. Note that you must Exit your session after running this command and reopen to continue with the latest version.

Check our NuGet

Get Windows Server 2016 Automation with PowerShell Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.