add-type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    public class TrustAllCertsPolicy : ICertificatePolicy {
        public bool CheckValidationResult(
            ServicePoint srvPoint, X509Certificate certificate,
            WebRequest request, int certificateProblem) {
            return true;
        }
    }
"@

[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
$user = "admin"
$pass= "Super2003"
$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($user, $secpasswd)
$Response = Invoke-WebRequest -Uri "https://localhost:4433/WebService/InvokeEventRule" -Method "POST" -Credential $credential -Body "EventRuleName=PROCESS-Pull&EventParams="
([xml]$Response.Content).root.ContextVariables.Variable

# Name                                  #cdata-section
# ----                                  --------------
# AWE.EXECUTION_TIME_MS                 0
# AWE.LOG_PATH                          C:\ProgramData\Globalscape\EFT Server Enterprise\AWE\Temp\\GS0334_MySite_SetVariable_2019-12-05-15-58-28-40.csv
# AWE.RESULT_CODE                       0
# AWE.RESULT_DESCRIPTION                Success
# AWE.TASK_NAME                         SetVariable
# CONNECTION.HTTP.HEADER.AUTHORIZATION  Basic YWRtaW46U3VwZXIyMDAz
# CONNECTION.HTTP.HEADER.CONTENT-LENGTH 39
# CONNECTION.HTTP.HEADER.CONTENT-TYPE   application/x-www-form-urlencoded
# CONNECTION.HTTP.HEADER.HOST           localhost:4433
# CONNECTION.HTTP.HEADER.USER-AGENT     Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.14393.3053
# CONNECTION.HTTP.HEADERS_LIST          USER-AGENT;CONTENT-TYPE;AUTHORIZATION;HOST;CONTENT-LENGTH;
# CONNECTION.USING_WEB_TRANSFER_CLIENT  No
# EVENT.DATESTAMP                       20191205
# EVENT.EVENTNAME                       PROCESS-Pull
# EVENT.NAME                            Scheduler (Timer) Event
# EVENT.REASON                          Access denied
# EVENT.TIME                            05 Dec 19 15:58:28
# EVENT.TIMESTAMP                       155828
# EVENT.TIMESTAMP_PRECISE               155828078
# EVENT.TRANSACTION_ID                  5D8E2F43-17AA-11ea-9169-E4B31824429F
# SERVER.INSTALL_DIRECTORY              C:\Program Files (x86)\Globalscape\EFT Server Enterprise
# SERVER.LOG_LOCATION                   C:\ProgramData\Globalscape\EFT Server Enterprise\Logs\
# SERVER.LOG_TYPE                       Microsoft IIS Log File Format
# SERVER.NODE_NAME                      GS0334
# SERVER.STATUS                         Yes
# SITE.ACCOUNT_MANAGEMENT_URL           https://localhost:4433/manageaccount
# SITE.NAME                             MySite

([xml]$Response.Content).root.ContextVariables.Variable[0]."#cdata-section"