| ms.date | 06/09/2017 |
|---|---|
| schema | 2.0.0 |
| locale | en-us |
| keywords | powershell,cmdlet |
| online version | http://go.microsoft.com/fwlink/?LinkID=517137 |
| external help file | Microsoft.PowerShell.PackageManagement.dll-Help.xml |
| title | Get-PackageSource |
Gets a list of package sources that are registered for a package provider.
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>]
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.
PS C:\> Get-PackageSource
This command gets all package sources that are registered with Package Management on the local computer.
PS C:\> Get-PackageSource -ProviderName "PSModule"
This command gets all package sources that are registered for the PSModule 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.
Forces the command to run without asking for user confirmation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIndicates that this cmdlet forces Package Management to automatically install the package provider.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the location of the Package Management source or repository.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the name of the Package Management source.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the Package Management provider.
Type: String
Parameter Sets: PowerShellGet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the provider name. The acceptable values for this parameter are:
- msi
- msu
- PowerShellGet
- nuget
- chocolatey
Type: String[]
Parameter Sets: (All)
Aliases: Provider
Accepted values: Programs, msi, msu, PowerShellGet, nuget, chocolatey
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseSpecifies the publish location for the package source.
Type: String
Parameter Sets: PowerShellGet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the script publish location.
Type: String
Parameter Sets: PowerShellGet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the script source location.
Type: String
Parameter Sets: PowerShellGet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{Fill ConfigFile Description}}
Type: String
Parameter Sets: NuGet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{Fill SkipValidate Description}}
Type: SwitchParameter
Parameter Sets: NuGet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Specifies one or more package sources.