NAME
Unregister-PackageSource
SYNOPSIS
Removes a registered package source.SYNTAX
Unregister-PackageSource [-ConfigFile
] [-Confirm] [-Credential ] [-Force] [-ForceBootstrap] [-SkipValidate] [-WhatIf] [
] Unregister-PackageSource [-ConfigFile
] [-Confirm] [-Credential ] [-Force] [-ForceBootstrap] [-SkipValidate] [-WhatIf] [
] Unregister-PackageSource [-Confirm] [-Credential
] [-Force] [-ForceBootstrap] -InputObject
[-WhatIf] [ ] Unregister-PackageSource [[-Source]
] [-Confirm] [-Credential ] [-Force] [-ForceBootstrap] [-Location
[] [-ProviderName {msi | NuGet | msu | Programs | PowerShellGet | psl | chocolatey}] [-WhatIf] ] Unregister-PackageSource [-Confirm] [-Credential
] [-Force] [-ForceBootstrap] [-PackageManagementProvider
] [-PublishLocation ] [-ScriptPublishLocation ] [-ScriptSourceLocation
] [-WhatIf] [ ] Unregister-PackageSource [-Confirm] [-Credential
] [-Force] [-ForceBootstrap] [-PackageManagementProvider
] [-PublishLocation ] [-ScriptPublishLocation ] [-ScriptSourceLocation
] [-WhatIf] [ ] DESCRIPTION
The Unregister-PackageSource cmdlet removes a registered package source. Package sources are always managed by a
package provider.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 rights to unregister a package source for a specified package provider. Specify a user name, such as User01, or Domain\User01, or specify a PSCredential object, such as one generatedby the Get-Credential cmdlet. The simplest way to specify a PSCredential object is to save the results of a
Get-Credential cmdlet as a variable. When you add this parameter and specify a user name, you are prompted to
provide a password after you run the command. 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 forces Package Management to automatically install the package provider for the specified package source. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -InputObject
Specifies a package source by using the package source's object, which is shown in the results of theGet-PackageSource cmdlet.
Required? true Position? named Default value None Accept pipeline input? True (ByValue) Accept wildcard characters? false-Location
Specifies the location to which a package source points. The value of this parameter can be a URI, a file path, or any other destination format that is supported by the package provider. Required? false Position? named 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-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] -Source
Specifies the friendly name of the package source. Required? false Position? 0 Default value None 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
You cannot pipe input to this cmdlet.OUTPUTS
This cmdlet does not generate any output.NOTES
Example 1: Unregister a package source for the Nuget provider
PS C:\>Unregister-PackageSource -Source "MyRep" -Location "http://contoso/nuget/MyRepository/api/v3" -Provider
"Nuget" This command unregisters a package source named Features for the Nuget provider. You are prompted to confirm that you want to unregister the package because the Force parameter is not specified,Example 2: Unregister a package source by using a PackageSource object
PS C:\>$A = Get-PackageSource -Name "MyRep" -Location "http://contoso/nuget/Features/api/v3"
PS C:\>Unregister-PackageSource -InputObject $A -Force
This command unregisters a package source named Features for the Nuget provider by saving the results of aGet-PackageSource command to a variable, and then using the variable as input to Unregister-PackageSource . The
Force parameter ensures that you are not prompted to confirm that you want to unregister the package.RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=517143 about_PackageManagementGet-PackageSource
Register-PackageSource
Set-PackageSource