--------------------------------------------------------------------------
create a file named test.ps1
write below cmds
body=@"< a >name< / a>< b>password< / b>"@
$URL = "http://www.computerperformance.co.uk"
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", 'text/xml')
$headers.Add("SOAPAction",
'')
$response
=
Invoke-WebRequest
-Uri $Url -Body $body -Headers
$headers
-Method POST
$reponse.StatusCode
Run the script with FQDN
&; "C:\Scripts\test.ps1"
----
$response = Invoke-WebRequest -Uri "http://somesite.com/oneendpoint" -Method Post -Body $JSON -ContentType "text/xml"
$uri = 'https://www.myWebsite.com/ext/ext/ext'
$data = Get-Content "kronos_ping.xml"
$result = Invoke-WebRequest -Uri $uri -Body $data -ContentType 'text/xml' -Method POST
$result.RawContent
----
----
$response = Invoke-WebRequest -Uri "http://somesite.com/oneendpoint" -Method Post -Body $JSON -ContentType "text/xml"
$uri = 'https://www.myWebsite.com/ext/ext/ext'
$data = Get-Content "kronos_ping.xml"
$result = Invoke-WebRequest -Uri $uri -Body $data -ContentType 'text/xml' -Method POST
$result.RawContent
----