< Back
Unregister-PSRepository
Post
NAME Unregister-PSRepository
SYNOPSIS
Unregisters a repository.
SYNTAX
Unregister-PSRepository [-Name] <String[]> [<CommonParameters>]
DESCRIPTION
The Unregister-PSRepository cmdlet unregisters a repository for the current user.
PARAMETERS
-Name <String[]>
Specifies an array of names of the repositories to remove.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
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: Unregister a repository
PS C:\\>Unregister-PSRepository -Name "myNuGetSource"
This command unregisters the repository named myNuGetSource.
Example 2: Unregister all repositories
PS C:\\>Get-PSRepository | Unregister-PSRepository
This command uses Get-PSRepository to get all registered repositories, and uses the pipeline operator to pass them to Unregister-PSRepository to
unregister them. Note that PSGallery is a built-in repository and cannot be unregistered.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=821675
Get-PSRepository
Register-PSRepository
Set-PSRepository
SYNOPSIS
Unregisters a repository.
SYNTAX
Unregister-PSRepository [-Name] <String[]> [<CommonParameters>]
DESCRIPTION
The Unregister-PSRepository cmdlet unregisters a repository for the current user.
PARAMETERS
-Name <String[]>
Specifies an array of names of the repositories to remove.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
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: Unregister a repository
PS C:\\>Unregister-PSRepository -Name "myNuGetSource"
This command unregisters the repository named myNuGetSource.
Example 2: Unregister all repositories
PS C:\\>Get-PSRepository | Unregister-PSRepository
This command uses Get-PSRepository to get all registered repositories, and uses the pipeline operator to pass them to Unregister-PSRepository to
unregister them. Note that PSGallery is a built-in repository and cannot be unregistered.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=821675
Get-PSRepository
Register-PSRepository
Set-PSRepository