Could anyone help me to develop a script that downloads multiple files from a password protected https site, please?
I could download a single file at a time using the following script, but could not retrieve a list of all the files in the target folder and loop it.
DL target URL
$target_url = “***”
Save to
$file_path = “*”
credential account
$user = “"
$pass = "”
WebClient setting
$web_client = New-Object System.Net.WebClient
$credential = New-Object System.Net.NetworkCredential($user, $pass)
$web_client.Credentials = $credential
File download
$web_client.DownloadFile($target_url, $file_path)