0

I'm trying to download multiple images from a site using PowerShell and the following command:

Import-csv text.csv | Start-BitsTransfer -UseStoredCredential proxy

The server requires authentication and this command did not work. To download a single image I previously used the following command:

Invoke Web-Request Uri - <URL> -UseDefaultCredentials - Outfile <path>```

UseDefaultCredentials worked for that command, but UseStoredCredential does not work for Start-BitsTransfer. Does anyone know why?

hockeyhorror
  • 57
  • 2
  • 7
  • Proxy: Credentials stored in the Windows Credential Manager are used for authentication for any proxy server that requires authentication. ***If no credentials in the Windows Credential Manager match the proxy server needing authentication, then you must specify credentials by using the ProxyCredential parameter.*** – postanote Apr 14 '21 at 00:06
  • If it can help, [here](https://stackoverflow.com/a/15670283/608772) is an example with PSCredentials. – JPBlanc Apr 14 '21 at 03:07
  • See that's the thing. When I used Invoke Web-Request and specified my username and pw it didn't work. When I used UseDefaultCredentials it did work. So I assumed that would also be the case with Starts-BitsTransfer. – hockeyhorror Apr 15 '21 at 01:49

0 Answers0