< Back
Get-PackageSource
Post
NAME Get-PackageSource
SYNOPSIS
Gets a list of package sources that are registered for a package provider.
SYNTAX
Get-PackageSource [[-Name] <String>] [-ConfigFile <String>] [-Force] [-ForceBootstrap] [-Location <String>]
[-ProviderName {msi | NuGet | msu | Programs | PowerShellGet | psl | chocolatey}] [-SkipValidate]
[<CommonParameters>]
Get-PackageSource [[-Name] <String>] [-Force] [-ForceBootstrap] [-Location <String>] [-PackageManagementProvider
<String>] [-ProviderName {msi | NuGet | msu | Programs | PowerShellGet | psl | chocolatey}] [-PublishLocation
<String>] [-ScriptPublishLocation <String>] [-ScriptSourceLocation <String>] [<CommonParameters>]
DESCRIPTION
The Get-PackageSource gets a list of package sources that are registered with Package Management on the local
computer. If you specify a package provider, Get-PackageSource gets only those sources that are associated with
the specified provider. Otherwise, the command returns all package sources that are registered with Package
Management.
PARAMETERS
-ConfigFile <String>
{{Fill ConfigFile Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Forces the command to run without asking for user confirmation.
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
-Location <String>
Specifies the location of the Package Management source or repository.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies the name of the Package Management source.
Required? false
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PackageManagementProvider <String>
Specifies the Package Management provider.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ProviderName <String[]>
Specifies the provider name. The acceptable values for this parameter are:
- msi
- msu
- PowerShellGet
- nuget
- chocolatey
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PublishLocation <String>
Specifies the publish location for the package source.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ScriptPublishLocation <String>
Specifies the script publish location.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ScriptSourceLocation <String>
Specifies the script source location.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SkipValidate [<SwitchParameter>]
{{Fill SkipValidate Description}}
Required? false
Position? named
Default value False
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
PackageSource[]
Specifies one or more package sources.
NOTES
Example 1: Get all package sources
PS C:\\>Get-PackageSource
This command gets all package sources that are registered with Package Management on the local computer.
Example 2: Get all package sources for a specific provider
PS C:\\>Get-PackageSource -ProviderName "PSModule"
This command gets all package sources that are registered for the PSModule provider.
Example 3: Get all package sources for a specific provider
PS C:\\>Get-PackageProvider "PSModule" | Get-PackageSource
This command gets all package sources for the PSModule provider by piping the results of the Get-PackageProvider
cmdlet to Get-PackageSource .
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=517137
about_PackageManagement
Register-PackageSource
Set-PackageSource
Unregister-PackageSource
SYNOPSIS
Gets a list of package sources that are registered for a package provider.
SYNTAX
Get-PackageSource [[-Name] <String>] [-ConfigFile <String>] [-Force] [-ForceBootstrap] [-Location <String>]
[-ProviderName {msi | NuGet | msu | Programs | PowerShellGet | psl | chocolatey}] [-SkipValidate]
[<CommonParameters>]
Get-PackageSource [[-Name] <String>] [-Force] [-ForceBootstrap] [-Location <String>] [-PackageManagementProvider
<String>] [-ProviderName {msi | NuGet | msu | Programs | PowerShellGet | psl | chocolatey}] [-PublishLocation
<String>] [-ScriptPublishLocation <String>] [-ScriptSourceLocation <String>] [<CommonParameters>]
DESCRIPTION
The Get-PackageSource gets a list of package sources that are registered with Package Management on the local
computer. If you specify a package provider, Get-PackageSource gets only those sources that are associated with
the specified provider. Otherwise, the command returns all package sources that are registered with Package
Management.
PARAMETERS
-ConfigFile <String>
{{Fill ConfigFile Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Forces the command to run without asking for user confirmation.
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
-Location <String>
Specifies the location of the Package Management source or repository.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies the name of the Package Management source.
Required? false
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PackageManagementProvider <String>
Specifies the Package Management provider.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ProviderName <String[]>
Specifies the provider name. The acceptable values for this parameter are:
- msi
- msu
- PowerShellGet
- nuget
- chocolatey
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PublishLocation <String>
Specifies the publish location for the package source.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ScriptPublishLocation <String>
Specifies the script publish location.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ScriptSourceLocation <String>
Specifies the script source location.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SkipValidate [<SwitchParameter>]
{{Fill SkipValidate Description}}
Required? false
Position? named
Default value False
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
PackageSource[]
Specifies one or more package sources.
NOTES
Example 1: Get all package sources
PS C:\\>Get-PackageSource
This command gets all package sources that are registered with Package Management on the local computer.
Example 2: Get all package sources for a specific provider
PS C:\\>Get-PackageSource -ProviderName "PSModule"
This command gets all package sources that are registered for the PSModule provider.
Example 3: Get all package sources for a specific provider
PS C:\\>Get-PackageProvider "PSModule" | Get-PackageSource
This command gets all package sources for the PSModule provider by piping the results of the Get-PackageProvider
cmdlet to Get-PackageSource .
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=517137
about_PackageManagement
Register-PackageSource
Set-PackageSource
Unregister-PackageSource