Public/Caches/Remove-R1Cache.ps1
|
# .ExternalHelp psRadiantOne-help.xml function Remove-R1Cache { [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')] [OutputType([void])] param( [parameter( Mandatory = $true, ValueFromPipelineByPropertyName = $true )] [ValidateNotNullOrEmpty()] [Alias('label')] [string]$dn ) Begin { Assert-R1Session -RequireToken }#begin Process { $URI = Resolve-R1ServiceUrl -Service Namespace -Path "caches/$($dn | Get-EscapedString)" if ($PSCmdlet.ShouldProcess($dn, 'Delete Persistent Cache')) { $null = Invoke-R1RestMethod -Uri $URI -Method DELETE } }#process End { }#end } |