public/Remove-VSASessionTimer.ps1

function Remove-VSASessionTimer
{
    <#
    .Synopsis
       Deletes a SessionTimer.
    .DESCRIPTION
       Deletes a SessionTimer without committing the data to the database or with.
       Takes either persistent or non-persistent connection information.
    .PARAMETER VSAConnection
        Specifies existing non-persistent VSAConnection.
    .PARAMETER URISuffix
        Specifies URI suffix if it differs from the default.
    .EXAMPLE
       Remove-VSASessionTimer -TimerId 123
    .EXAMPLE
       Remove-VSASessionTimer -TimerId 123 -VSAConnection $connection -Force
    .INPUTS
       Accepts piped non-persistent VSAConnection
    .OUTPUTS
       True if successful.
    #>


    [CmdletBinding()]
    param ( 
        [parameter(Mandatory = $false, 
            ValueFromPipelineByPropertyName = $true)]
        [VSAConnection] $VSAConnection,

        [parameter(DontShow, Mandatory=$false)]
        [ValidateNotNullOrEmpty()] 
        [string] $URISuffix = "api/v1.0/system/sessiontimers/{0}",

        [parameter(Mandatory=$true,
            ValueFromPipelineByPropertyName=$true)]
        [ValidateScript({
            if( $_ -notmatch "^\d+$" ) {
                throw "Non-numeric Id"
            }
            return $true
        })]
        [string] $TimerId,

        [switch] $Force
)
    process {
    $Method = if ($Force) { 'PATCH' } else { 'DELETE' }

    return Invoke-VSAWriteRequest -Method $Method -URISuffix ($URISuffix -f $TimerId) -VSAConnection $VSAConnection
    }
}

Export-ModuleMember -Function Remove-VSASessionTimer