NAME
Register-PackageSource
SYNOPSIS
Adds a package source for a specified package provider.SYNTAX
Register-PackageSource [[-Name]
] [[-Location] ] [-ConfigFile ] [-Confirm] [-Credential
] [-Force] [-ForceBootstrap] [-Proxy ] [-ProxyCredential ] [-SkipValidate] [-Trusted] [-WhatIf] [
] Register-PackageSource [[-Name]
] [[-Location] ] [-Confirm] [-Credential ] [-Force] [-ForceBootstrap] [-PackageManagementProvider
] [-Proxy ] [-ProxyCredential ] [-PublishLocation
] [-ScriptPublishLocation ] [-ScriptSourceLocation ] [-Trusted] [-WhatIf] [
] Register-PackageSource [[-Name]
] [[-Location] ] [-Confirm] [-Credential ] [-Force] [-ForceBootstrap] [-ProviderName {msi | NuGet | msu | Programs | PowerShellGet | psl | chocolatey}] [-Proxy
] [-ProxyCredential
] [-Trusted] [-WhatIf] [ ] DESCRIPTION
The Register-PackageSource cmdlet adds a package source for a specified package provider. Package sources are
always managed by a package provider. If the package provider cannot add or replace a package source, the provider generates an error message.PARAMETERS
-ConfigFile
{{Fill ConfigFile Description}} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Confirm [
Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Credential
Specifies a user account that has permission to install package providers. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Force [
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 [
Indicates that this cmdlet automatically installs the package provider. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Location
Specifies the package source location. Required? false Position? 1 Default value None Accept pipeline input? False Accept wildcard characters? false-Name
Specifies the name of the package source to register. Required? false Position? 0 Default value None Accept pipeline input? False Accept wildcard characters? false-PackageManagementProvider
Specifies the Package Management provider. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-ProviderName
Specifies the provider name. Required? false Position? named Default value NoneAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-Proxy
@{Text=} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-ProxyCredential
@{Text=} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-PublishLocation
Specifies the publish location. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-ScriptPublishLocation
Specifies the script publish location. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-ScriptSourceLocation
Specifies the script source location. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-SkipValidate [
{{Fill SkipValidate Description}} Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Trusted [
Indicates that the package source is trusted. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -WhatIf [
Shows what would happen if the cmdlet runs. The cmdlet is not run. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] 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
NOTES
Example 1: Register a package source for the NuGet provider
PS C:\>Register-PackageSource -Name "MyRep" -Location "http://contoso/psmodule/Features/api/v3" -ProviderName
"PsModule"This command registers a package source, a web-based location for the PSModule provider. If you do not add the
Trusted parameter, by default, the package is not trusted, and users are prompted to confirm that they trust the source before installing packages from the source.RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=517139 about_PackageManagementGet-PackageSource
Set-PackageSource
Unregister-PackageSource