Public/Resources/Remove-SIAWindowsStrongAccount.ps1

function Remove-SIAWindowsStrongAccount {
    <#
    .SYNOPSIS
        Deletes a Windows strong account from SIA.
    .DESCRIPTION
        Permanently removes a strong account. This does not affect the
        underlying Windows account itself.
    .PARAMETER Id
        The strong account's secret ID, as returned by Get-SIAWindowsStrongAccount.
    .EXAMPLE
        Remove-SIAWindowsStrongAccount -Id 'secret-01'

        Deletes the specified strong account after confirmation.
    .INPUTS
        psSIA.WindowsStrongAccount
    .OUTPUTS
        None.
    .LINK
        https://docs.cyberark.com/setup/latest/en/content/privileged-access/apis/dpa-strong-accounts-api.htm
    #>

    [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
    param(
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [Alias('secret_id')]
        [string]$Id
    )

    process {
        if ($PSCmdlet.ShouldProcess($Id, 'Delete Windows strong account')) {
            Invoke-SIARequest -Method DELETE -Path "/api/secrets/public/v1/$Id" | Out-Null
        }
    }
}