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?