Video Screencast Help

Powershell 3.0 Invoke-WebRequest for WF service

Created: 17 Jul 2013 | 1 comment

I am using Powershell to trigger a Decision Only workflow using the Invoke-WebRequest command. However, I want this workflow to use authentication. How do you pass authentication with powershell?


$uri = "https://workflowserver/Demo/MyService.asmx?WSDL"

$soap = @'

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">


<Execute xmlns="" />




[xml]$WF = Invoke-WebRequest $uri -Method post -ContentType "text/xml" -Body $soap



Comments 1 CommentJump to latest comment

noodleNT's picture

Figured it out...

[xml]$WF = Invoke-WebRequest $uri -UseDefaultCredentials -Method post -ContentType "text/xml" -Body $soap