Skip to main content
Skip table of contents

Errors using Curl calling Runtime API using MS Powershell

Problem

DATPROF Runtime provides an API that can be accessed using tools like wget or curl.

However, when using PowerShell, you might encounter the following error:

 Invoke-WebRequest : A positional parameter cannot be found that accepts argument 'X-auth-token:.........


Solution

This issue is caused by the curl alias defined in PowerShell.

The alias is defined as follows: Alias curl -> Invoke-WebRequest

This curl alias does not function like the native curl command and unfortunately takes precedence over your local curl installation.

To resolve this problem, remove the alias using the Remove-Item cmdlet:

CODE
PS> Remove-Item alias:curl


then try again



To read a discussion about using and changing cURL in Powershell check this:

http://thesociablegeek.com/azure/using-curl-in-powershell/



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.