diff --git a/Install-ManagementAgent.ps1 b/Install-ManagementAgent.ps1 index 19d63e4..4a73da1 100644 --- a/Install-ManagementAgent.ps1 +++ b/Install-ManagementAgent.ps1 @@ -30,11 +30,8 @@ If ( $CUSTOMER_ID ) } ## Download the agent installer - Try - { - [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} - (New-Object System.Net.WebClient).DownloadFile($AGENT_URL, $AGENT_INSTALLER) - } + [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} + Try { (New-Object System.Net.WebClient).DownloadFile($AGENT_URL, $AGENT_INSTALLER) } Catch { Write-Output $_.Exception.Message ; Exit } ## Install the agent