I am trying to connect (in PowerShell) via curl but with no success.
Below is the following code I've inserting in order to establish the connection:
curl -u <USER>:<PASSWORD> https://something.com
but got the error:
Invoke-WebRequest : Parameter cannot be processed because the parameter name 'u' is ambiguous.
Possible matches include: -UseBasicParsing -Uri -UseDefaultCredentials -UserAgent.
So, I tried to look for a solution at SO, such as:
PowerShell's Invoke-RestMethod equivalent of curl -u (Basic Authentication)
Running cURL on 64 bit Windows
and on GitHub: https://github.com/PowerShell/PowerShell/issues/4351
But got no success. I also reinstalled the 'curl' in my machine and tried to use Invoke-WebRequest directly, but the problem persisted.
I'm new at PowerShell, maybe I'm doing a mistake when coding those lines, but do you have any suggestion how to deal with? Do you think there is a better Command Prompt/CLI than PowerShell to use curl?
curlis a built-in alias forInvoke-WebRequest. Make sure you're callingcurl.exeGet-Alias curland it just confirmed theInvoke-WebRequest. Also tried to putcurl.exedirectly but got an error...curl.exe. If I had to guess, you didn't qualify the path (i.e., you need to be in the directory where the executable is and call it like:.\curl.exe ...)curl: (6) Could not resolve host: cglcloud.jfrog.io, but I think it's because I am behind a corporate proxy. Should I set the proxy in the same.\curl.exeline, correct?curl.exeand proxies, but I'm sure if you read the manpage for the utility then you can figure out which flags to pass.