In the past I did use :
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$url = "https://nodejs.org/dist/v14.17.6/node-v14.17.6-x64.msi"
$folder = "C:\Users\test\Downloads"
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile($url, $folder)
When I try today it shows this error
Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
At line:1 char:5
+ $WebClient.DownloadFile($url, $folder)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
I tried to fix with suggestions found but none worked.