Modify a PowerShell deployment script to ensure download of the Microsoft Windows agent executable
If you are using a PowerShell deployment script to install the Deep Security Agent in an environment with protocol restrictions, your script may encounter the following error when trying to download the Deep Security Agent's agent.msi executable for Microsoft Windows:
Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: An unexpected error occurred on a send."
To ensure that the deployment script can download the executable, set the security protocol to TLS 1.2 by adding the following line to the beginning of the script:
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12