I'm trying to download an image from the internet using a command prompt like PowerShell or the Windows command line.
I tried running this line that I found online:
wget http://imgur.com/ -OutFile out.jpg
That's an example, not the actual parameters that I used.
I ran this in PowerShell, but I get
System.UnauthorizedAccessException
I'm not very experienced in the command line and don't know what to do from here.
Use Invoke-WebRequest
:
Invoke-WebRequest -Uri https://i.imgur.com/XoSe08F.jpg -OutFile test.jpg -UseBasicParsing
In case of Edge or Internet Explorer is not installed use the -UseBasicParsing
switch, otherwise Invoke-WebRequest
might fail.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With