< Back
Get-PackageProvider
Post
NAME Get-PackageProvider
SYNOPSIS
Returns a list of package providers that are connected to Package Management.
SYNTAX
Get-PackageProvider [[-Name] <String[]>] [-Force] [-ForceBootstrap] [-ListAvailable] [<CommonParameters>]
DESCRIPTION
The Get-PackageProvider cmdlet returns a list of package providers that are connected to Package Management.
Examples of these providers include PSModule, NuGet, and Chocolatey. You can filter the results based on all or
part of one or more provider names.
PARAMETERS
-Force [<SwitchParameter>]
Indicates that this cmdlet forces all other actions with this cmdlet that can be forced. In
Get-PackageProvider , this means the Force parameter acts the same as the ForceBootstrap parameter.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ForceBootstrap [<SwitchParameter>]
Indicates that this cmdlet forces Package Management to automatically install the package provider.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ListAvailable [<SwitchParameter>]
Gets all installed providers. Get-PackageProvider gets provider in paths listed in the PSModulePath
environment variable as well as the package provider assembly folders:
$env:ProgramFiles\\PackageManagement\\ProviderAssemblies $env:LOCALAPPDATA\\PackageManagement\\ProviderAssemblies
Without this parameter, Get-PackageProvider gets only the providers loaded in the current session.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Name <String[]>
Specifies one or more provider names, or partial provider names. Separate multiple provider names with commas.
Valid values for this parameter include names of providers that you have installed with packages;
PackageManagement ships with a set of default providers, including the PSModule and MSI providers.
Required? false
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
PackageProvider[]
NOTES
Example 1: Get all currently loaded package providers
PS C:\\>Get-PackageProvider
This command gets a list of all the package providers that are currently loaded on the local computer.
Example 2: Get all available package providers
PS C:\\>Get-PackageProvider -ListAvailable
This command gets a list of all package providers that are available on the local computer.
Example 3: Dynamically get a package provider
PS C:\\>Get-PackageProvider -Name "Chocolatey" -ForceBootstrap
This command automatically installs the Chocolatey provider if your computer does not have the Chocolatey provider
installed.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=517136
about_PackageManagement
Get-PackageSource
Register-PackageSource
Unregister-PackageSource
SYNOPSIS
Returns a list of package providers that are connected to Package Management.
SYNTAX
Get-PackageProvider [[-Name] <String[]>] [-Force] [-ForceBootstrap] [-ListAvailable] [<CommonParameters>]
DESCRIPTION
The Get-PackageProvider cmdlet returns a list of package providers that are connected to Package Management.
Examples of these providers include PSModule, NuGet, and Chocolatey. You can filter the results based on all or
part of one or more provider names.
PARAMETERS
-Force [<SwitchParameter>]
Indicates that this cmdlet forces all other actions with this cmdlet that can be forced. In
Get-PackageProvider , this means the Force parameter acts the same as the ForceBootstrap parameter.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ForceBootstrap [<SwitchParameter>]
Indicates that this cmdlet forces Package Management to automatically install the package provider.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ListAvailable [<SwitchParameter>]
Gets all installed providers. Get-PackageProvider gets provider in paths listed in the PSModulePath
environment variable as well as the package provider assembly folders:
$env:ProgramFiles\\PackageManagement\\ProviderAssemblies $env:LOCALAPPDATA\\PackageManagement\\ProviderAssemblies
Without this parameter, Get-PackageProvider gets only the providers loaded in the current session.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Name <String[]>
Specifies one or more provider names, or partial provider names. Separate multiple provider names with commas.
Valid values for this parameter include names of providers that you have installed with packages;
PackageManagement ships with a set of default providers, including the PSModule and MSI providers.
Required? false
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
PackageProvider[]
NOTES
Example 1: Get all currently loaded package providers
PS C:\\>Get-PackageProvider
This command gets a list of all the package providers that are currently loaded on the local computer.
Example 2: Get all available package providers
PS C:\\>Get-PackageProvider -ListAvailable
This command gets a list of all package providers that are available on the local computer.
Example 3: Dynamically get a package provider
PS C:\\>Get-PackageProvider -Name "Chocolatey" -ForceBootstrap
This command automatically installs the Chocolatey provider if your computer does not have the Chocolatey provider
installed.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=517136
about_PackageManagement
Get-PackageSource
Register-PackageSource
Unregister-PackageSource