PackageManagement

This topic displays help topics for the Package Management Cmdlets. The cmdlet reference documentation on this site documents the latest version of the module.

Important

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:

[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

For more information, see the announcement in the PowerShell blog.

Important

The commands contained in the PackageManagement module are different than the commands provided by the NuGet module in the Package Manager Console of Visual Studio. Each module has commands that are not available in the other. Commands with the same name differ in their specific arguments. For more information, see the PowerShell reference documentation for the Package Manager Console of Visual Studio.

PackageManagement

Find-Package

Finds software packages in available package sources.

Find-PackageProvider

Returns a list of Package Management package providers available for installation.

Get-Package

Returns a list of all software packages that were installed with PackageManagement.

Get-PackageProvider

Returns a list of package providers that are connected to Package Management.

Get-PackageSource

Gets a list of package sources that are registered for a package provider.

Import-PackageProvider

Adds Package Management package providers to the current session.

Install-Package

Installs one or more software packages.

Install-PackageProvider

Installs one or more Package Management package providers.

Register-PackageSource

Adds a package source for a specified package provider.

Save-Package

Saves packages to the local computer without installing them.

Set-PackageSource

Replaces a package source for a specified package provider.

Uninstall-Package

Uninstalls one or more software packages.

Unregister-PackageSource

Removes a registered package source.