file downloading powershell code example
Example 1: powershell download a file from url
$Link = "https://www.7-zip.org/a/7z1900-x64.msi"
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile("$Link","$env:USERPROFILE\Downloads\7zip1900.msi");
Example 2: powershell download file
Invoke-WebRequest URL -OutFile c:\file.ext