Public/Connectors/Remove-SIAConnector.ps1

function Remove-SIAConnector {
    <#
    .SYNOPSIS
        Deletes a SIA connector.
    .DESCRIPTION
        Permanently removes a connector from the tenant. This does not remove
        the underlying host or its installed connector software.
    .PARAMETER Id
        The connector's id, as returned by Get-SIAConnector.
    .EXAMPLE
        Remove-SIAConnector -Id 'CMSConnector_51051e8b-3750-45ce-afbf-e9106109694c'

        Deletes the specified connector after confirmation.
    .INPUTS
        psSIA.Connector
    .OUTPUTS
        None.
    .LINK
        https://api-docs.cyberark.com/secure-infra-access/docs/sia-connector-api
    #>

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

    process {
        if ($PSCmdlet.ShouldProcess($Id, 'Delete SIA connector')) {
            Invoke-SIARequest -Method DELETE -Path "/api/connectors/$Id" | Out-Null
        }
    }
}