public/Test-VSASSL.ps1
function Test-VSASSL { <# .Synopsis Tests SSL connection .DESCRIPTION Tests for connectivity with an SSL-enabled Kaseya REST API website. 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 Test-VSASSL .EXAMPLE Test-VSASSL -VSAConnection $connection .INPUTS Accepts piped non-persistent VSAConnection .OUTPUTS No output #> [CmdletBinding()] param ( [parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'NonPersistent')] [VSAConnection] $VSAConnection, [parameter(Mandatory=$false, ValueFromPipelineByPropertyName=$true, ParameterSetName = 'NonPersistent')] [parameter(Mandatory=$false, ValueFromPipelineByPropertyName=$true, ParameterSetName = 'Persistent')] [ValidateNotNullOrEmpty()] [string] $URISuffix = 'api/v1.0/echo' ) [hashtable]$Params =@{ URISuffix = $URISuffix } if($VSAConnection) {$Params.Add('VSAConnection', $VSAConnection)} return Get-VSAItems @Params } Export-ModuleMember -Function Test-VSASSL |