Hi Guys,
Thanks to this forum my post finally works. But i get an unknown error in this script:
# Setup data in variables
$Login = "login" $Password = "password" $Reference = "Technisch beheer" $BodyType = "Text" $BodyHeader = "Test" $Message = "TestMessage" $ToOperator="My name" $ToNumber="My phone" # Create a XML document function sendXML{ $url = "https://secure.cm.nl/smssgateway/cm/gateway.ashx" $parameters = '<?xml version="1.0" encoding="utf-8"?>` <MESSAGES>` <CUSTOMER ID="$Login" />` <USER LOGIN="$Login" PASSWORD="$Password" />` <REFERENCE>"Standby"</REFERENCE>` <MSG>` <BODY TYPE="$BodyType" HEADER="$BodyHeader">$Message</BODY>` <TO OPERATOR="$ToOperator">"$ToNumber"</TO>` </MSG>`</MESSAGES>' Invoke-WebRequest -Uri $url -Method POST -Body $parameters } sendXML
Error when i start the code:
StatusCode : 200
StatusDescription : OK
Content : Error: ERROR Unknown error
RawContent : HTTP/1.1 200 OK
Content-Length: 26
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Date: Wed, 04 Jun 2014 13:34:08 GMT
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Pow...
Unknown error is hard to troubleshoot.
Any ideas?
Kind regards,
André