2 0

Download Password protected File

$ProgressPreference = "SilentlyContinue"
$Link = "https://insert_link_to/file.zip"
$User = ""
$Pass = ""
$File = "file.zip"
$Path = "C:\Users\Public\Downloads"
if (Test-Path $Path\$File) {
  Remove-Item $Path\$File
}
Invoke-WebRequest -Uri $Link -OutFile $Path\$File -UseBasicParsing -Credential (New-Object PSCredential($User, (ConvertTo-SecureString -AsPlainText -Force -String $Pass)))
Expand-Archive $Path\$File $Path
Start-Process -FilePath $Path\NA1\scut.exe -ArgumentList "-noinstall" -Wait