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?

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
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