I am trying to create computer objects via SPML. I have the following XML file and I post it using PowerShell invoke-webrequest cmdlet. It doesn't work - the computer object doesn't get created but I don't get any error either. Using the same method to create a user works fine.
Here is my XML:
<?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"
<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>
<addRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
<data>
<attr name="edsvaParentDN" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>"ou=computers,OU=MyOU,DC=blahblah,DC=blahblah"</value>
</attr>
<attr name="cn" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>MyTestPC</value>
</attr>
<attr name="objectClass" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>computer</value>
</attr>
</data>
</addRequest>
</soap:Body>
</soap:Envelope>
<soap:Body>
<addRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
<data>
<attr name="edsvaParentDN" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>"ou=computers,OU=MyOU,DC=blahblah,DC=blahblah"</value>
</attr>
<attr name="cn" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>MyTestPC</value>
</attr>
<attr name="objectClass" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>computer</value>
</attr>
</data>
</addRequest>
</soap:Body>
</soap:Envelope>
This is what I get back:
StatusCode : 200
StatusDescription : OK
Content : <?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLS...
RawContent : HTTP/1.1 200 OK
Persistent-Auth: true
Content-Length: 515
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Date: Tue, 06 Feb 2018 21:22:40 GMT
Server: Microsoft-IIS/8.0
X...
Forms : {}
Headers : {[Persistent-Auth, true], [Content-Length, 515], [Cache-Control, private, max-age=0],
[Content-Type, text/xml; charset=utf-8]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : System.__ComObject
RawContentLength : 515
StatusDescription : OK
Content : <?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLS...
RawContent : HTTP/1.1 200 OK
Persistent-Auth: true
Content-Length: 515
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Date: Tue, 06 Feb 2018 21:22:40 GMT
Server: Microsoft-IIS/8.0
X...
Forms : {}
Headers : {[Persistent-Auth, true], [Content-Length, 515], [Cache-Control, private, max-age=0],
[Content-Type, text/xml; charset=utf-8]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : System.__ComObject
RawContentLength : 515
Am I missing something in the XML?
Thanks in advance.