Public/Targets/Remove-SIATargetSet.ps1
|
function Remove-SIATargetSet { <# .SYNOPSIS Deletes one or more SIA target sets in bulk. .DESCRIPTION Calls the Delete a bulk of target sets operation. CyberArk's published request schema was not captured in full during development; supply the fields it requires through -Body. This API is documented by CyberArk as subject to change without notice. .PARAMETER Body The request body identifying the target sets to delete. .EXAMPLE Remove-SIATargetSet -Body @(@{ target_set = 'contoso.local' }) Deletes the specified target set after confirmation. .INPUTS None. .OUTPUTS None. .LINK https://docs.cyberark.com/setup/latest/en/content/privileged-access/apis/dpa-target-sets.htm #> [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')] param( [Parameter(Mandatory)] $Body ) if ($PSCmdlet.ShouldProcess('SIA', 'Delete target sets')) { Invoke-SIARequest -Method DELETE -Path '/api/targetsets/bulk' -Body $Body | Out-Null } } |