Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curl -xget gives an error in powershell 5.1

As you can see, curl -xget is working fine in PS 7.2 and cmd, but gives an error in PS 5.1.

Invoke-WebRequest : A parameter cannot be found that matches parameter name 'xget'.

What am I doing wrong?

Screenshot of the error, Powershell windows side by side

like image 397
giveall Avatar asked Dec 08 '25 14:12

giveall


1 Answers

When you are calling curl in cmd and PowerShell Core it is calling the executable in %SYSTEMROOT%\System32\curl.exe while in PowerShell Desktop it is calling the Invoke-WebRequest command which does not have the xget parameter

If you want to use xget in PowerShell you have to use the curl.exe command instead

like image 144
Nico Nekoru Avatar answered Dec 10 '25 12:12

Nico Nekoru



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!