Quantcast
Channel: Symantec Connect - Endpoint Management
Viewing all articles
Browse latest Browse all 7217

Powershell 3.0 Invoke-WebRequest for WF service

$
0
0
I need a solution

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?

 

EXAMPLE:

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

$soap = @'

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

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<Execute xmlns="www.symantec.com" />

</soap:Body>

</soap:Envelope>

'@

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

write

 

 

$wf.Envelope.Body.ExecuteResponse.ExecuteResult


Viewing all articles
Browse latest Browse all 7217

Trending Articles



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