Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4049

How to use PowerShell invoke-webrequest with Windows Authentication and Username\Password

$
0
0

The following PowerShell invoke-webrequest works for me when the Windows Service I'm running it from has permission to call the webservice. However, this isn't always the case.

I need to the ability to use Windows Authentication but also set the account username\password for the call. Does anyone have some sample code for doing this?

Invoke-WebRequest -UseBasicParsing "url" -UseDefaultCredentials -Method GET

Viewing all articles
Browse latest Browse all 4049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>