By default, some versions of Windows force PowerShell to use TLS 1.0 for commands like Invoke-WebRequest. Since Automox requires TLS 1.2 for secure communication over Powershell, attempting to download files or execute commands without configuring this may fail.
Solution (For singular Powershell Session)
- Open PowerShell as an Administrator (32-bit or 64-bit).
Run the following command:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- The current Powershell session or script should now run at 1.2
Solution (Permanent on device)
Follow these steps to configure PowerShell to use TLS 1.2:
- Open PowerShell as an Administrator (32-bit or 64-bit).
- Run the following script:
$scriptBlock = {
$registryPaths = @(
"HKLM:\SOFTWARE\Microsoft\.NETFramework\v2.0.50727",
"HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319",
"HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727",
"HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319"
)
$values = @{
"SystemDefaultTlsVersions" = 1
"SchUseStrongCrypto" = 1
}
foreach ($path in $registryPaths) {
if (-not (Test-Path $path)) {
New-Item -Path $path -Force | Out-Null
}
foreach ($name in $values.Keys) {
New-ItemProperty `
-Path $path `
-Name $name `
-Value $values[$name] `
-PropertyType DWord `
-Force | Out-Null
}
} }
$exitCode = & "$env:SystemRoot\sysnative\WindowsPowerShell\v1.0\powershell.exe" `
-ExecutionPolicy Bypass `
-WindowStyle Hidden `
-NoProfile `
-NonInteractive `
-Command $scriptBlockVerification
To ensure TLS 1.2 is in use:
Run a command requiring Invoke-WebRequest and verify no TLS-related errors occur.
Invoke-Webrequest "https://api.automox.com" -UseBasicParsing