Unregister-PackageSource

SYNOPSIS

Unregister a package source.

SYNTAX

Unregister-PackageSource [-Name] <String[]> [-Provider <String>] [-PassThru]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Unregister a package source.

EXAMPLES

Example 1

Unregister-PackageSource -Name PSGallery

This command removes the PSGallery as a package source.

PARAMETERS

-Name

Specifies the name of the package source.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-PassThru

Returns a PackageSourceInfo object that represents the source that was unregistered. By default, Unregister-PackageSource doesn’t generate any output.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Provider

Specifies the package provider.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
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.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

You can use the pipeline to send a string for the source name.

OUTPUTS

AnyPackage.Provider.PackageSourceInfo

By default, this cmdlet doesn’t return any objects. Use the PassThru parameter to a return objects that represent a package source.

NOTES

Get-PackageSource

Register-PackageSource

Set-PackageSource