PSResourceGet
PSResourceGet copied to clipboard
Add a Rename-PSResourceRepository cmdlet
Summary of the new feature / enhancement
Currently the only way to rename a resource repository is to first unregister and then register it again. To make this easier for the user please introduce a Rename-PSResourceRepository.
Proposed technical implementation details (optional)
SYNTAX
Rename-PSResourceRepository [-Name] <string> [-NewName] <string> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
function Rename-PSResourceRepository {
[CmdletBinding(SupportsShouldProcess)]
param (
[Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string]
$Name,
[Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)]
[string]
$NewName,
[Parameter()]
[switch]
$PassThru
)
process {
if ($PSCmdlet.ShouldProcess($Name)) {
# Rename repository
}
}
}