Get-Package
Source
Syntax
Get-PackageSource
[[-Name] <String>]
[-Location <String>]
[-Force]
[-ForceBootstrap]
[-ProviderName <String[]>]
[-ConfigFile <String>]
[-SkipValidate]
[<CommonParameters>]
Get-PackageSource
[[-Name] <String>]
[-Location <String>]
[-Force]
[-ForceBootstrap]
[-ProviderName <String[]>]
[-PackageManagementProvider <String>]
[-PublishLocation <String>]
[-ScriptSourceLocation <String>]
[-ScriptPublishLocation <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.
Examples
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 .
Optional Parameters
{{Fill ConfigFile Description}}
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates that this cmdlet forces Package Management to automatically install the package provider.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the location of the Package Management source or repository.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of the Package Management source.
Type: | String |
Position: | 1 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the Package Management provider.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the provider name. The acceptable values for this parameter are:
- msi
- msu
- PowerShellGet
- nuget
- chocolatey
Type: | String[] |
Aliases: | Provider |
Parameter Sets: | Programs, msi, msu, PowerShellGet, nuget, chocolatey |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the publish location for the package source.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the script publish location.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the script source location.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
{{Fill SkipValidate Description}}
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
PackageSource[]
Specifies one or more package sources.