Public/Targets/Remove-SIASSHHostKeyFingerprint.ps1

function Remove-SIASSHHostKeyFingerprint {
    <#
    .SYNOPSIS
        Deletes a trusted SSH host key fingerprint.
    .DESCRIPTION
        Removes the fingerprint SIA validates against when connecting to the
        specified target over SSH. Future connections will fail host key
        validation until a new fingerprint is added.
    .PARAMETER TargetId
        The target's ID.
    .EXAMPLE
        Remove-SIASSHHostKeyFingerprint -TargetId 'target-01'

        Deletes the trusted fingerprint for the specified target after confirmation.
    .INPUTS
        None.
    .OUTPUTS
        None.
    .LINK
        https://api-docs.cyberark.com/secure-infra-access/docs/sia-ssh-host-key-fingerprints-api
    #>

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

    process {
        if ($PSCmdlet.ShouldProcess($TargetId, 'Delete SSH host key fingerprint')) {
            Invoke-SIARequest -Method DELETE -Path "/api/ssh-fingerprints/$TargetId" | Out-Null
        }
    }
}