public/Remove-FreeNasIscsiTarget.ps1
function Remove-FreeNasIscsiTarget { [CmdletBinding(SupportsShouldProcess)] [Alias()] Param ( [Parameter (Mandatory = $true)] [Int]$Id ) Begin { } Process { $Uri = "api/v1.0/services/iscsi/target/$Id/" if ($PSCmdlet.ShouldProcess("will be remove" , "The Target with the id $Id")) { $response = Invoke-FreeNasRestMethod -method Delete -body $post -Uri $Uri } } End { } } |