Private/Test-GlimpsMalwareConnection.ps1

function Test-GlimpsMalwareConnection {
    <#
    .SYNOPSIS
 
    Check current Glimps Malware Connexion.
 
    .DESCRIPTION
 
    Check if variables are present (ie. The Connect-GlimpsMalware has been launched)
 
    .EXAMPLE
 
    PS>Test-GlimpsMalwareConnection
         
    .INPUTS
         
    none
 
    .OUTPUTS
         
    void
    #>

    [CmdletBinding()]
    Param ()
    Begin {
    }
    Process {
        If (-not ($_ApiKey -and $_ApiURL)) {
            throw 'Please run Connect-GlimpsMalware before'
        }
    }
    End {
    }
}