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