Private/Remove-SDPVolumeView.ps1
|
function Remove-SDPVolumeView { [CmdletBinding(SupportsShouldProcess, ConfirmImpact='High')] param( [parameter(Mandatory,ValueFromPipelineByPropertyName)] [Alias('pipeId')] [string] $id, [parameter()] [switch] $Force, [parameter()] [string] $context = 'sdpconnection' ) ## Special Ops begin { $endpoint = 'snapshots' } process { if ($Force -and -not $PSBoundParameters.ContainsKey('Confirm')) { $ConfirmPreference = 'None' } if ($PSCmdlet.ShouldProcess("SDPVolumeView id=$id", 'Remove')) { ## Make the call $endpointURI = $endpoint + '/' + $id $results = Invoke-SDPRestCall -endpoint $endpointURI -method DELETE -context $context return $results } } } |