Setting up some CI stuff. I need a one-liner powershell command to download a file with basic authentication from a server.
I'm able to do it with an unauthenticated request like so:
iex ((New-Object Net.Webclient).DownloadString('http://myhost.example/resource.etc'))
How would I do the same but with authentication? From How to make an authenticated web request in Powershell?, I can see I need a NetworkCredential, just trying to figure out how to condense this to a single command.