I need to download a 51gb zip file from the internet, to open the website you need to enter a password.
I want to do this with a function in PowerShell(PSVersion:5.1.18362.752), but I can't get any further. My function looks like this:
$securepassword = "thepassword"
function Get-Files {
$Properties = @{
URI = "https://theurl"
Credential = $securepassword
}
Invoke-WebRequest @Properties -OutFile "C:\Users\$env:USERNAME\Desktop\thefiles.zip"
}
Can the parameter Credential only be used for Windows Credential?
Many thanks for the help