Below is the code in my custom script extension
$AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols
Invoke-WebRequest -Uri https://aka.ms/downloadazcopy-v10-windows -OutFile $env:C:\temp\azcopy.zip
when I run my custom script extension , I am getting below error
"Invoke-WebRequest : The underlying connection was closed: An unexpected error
Any help on how to resolve it ?