src/Disconnect-CciGet.ps1
|
function Disconnect-CciGet { <# .SYNOPSIS Unregister CCI feeds from the local PSResource repository list. .PARAMETER Tenant Optional. Unregister only the named feed. #> [CmdletBinding(SupportsShouldProcess)] param( [string]$Tenant ) $feeds = _Resolve-CciGetFeed -Tenant $Tenant foreach ($feed in $feeds) { $repoName = _Get-CciGetRepositoryName -FeedName $feed.name if (Get-PSResourceRepository -Name $repoName -ErrorAction SilentlyContinue) { if ($PSCmdlet.ShouldProcess($repoName, 'Unregister-PSResourceRepository')) { Unregister-PSResourceRepository -Name $repoName } } } } |