Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Invoke-RestMethod passing header values

$
0
0

I am trying to use Invoke-RestMethod cmdlet as i have a project to create VMs using API in our environment. API requires me to pass X-Auth-user and X-Auth-Password in the header field with my userid and password. I cant seem to figure out how to do that, -header parameter always goes into error state with below message whenever i pass the values.

invoke-RestMethod : Cannot bind parameter 'Headers'

Is there any specific syntax to be used in this? what am i trying wrong?


Viewing all articles
Browse latest Browse all 6937

Trending Articles