Trying to automate device deletion on 13.4 using the invoke-restmethod API script provided here (which currently works for me for folder/group creation)
https://discussions.soti.net/thread/using-powershell-to-make-api-calls/
I can currently delete the deviceID via API rest interface, with no issues:
Curl: curl -X DELETE --header -Authorization: Bearer XYZ123
Request URL: https://servername:443/MobiControl/api/devices/DEVICEID
Response Body: no content
Response Code: 204
However when trying to use the same 'Invoke-RestMethod' method to delete the same Request URL, I receive a message of 'The underlying connection was closed: An unexpected error occurred on a send'.
Can someone from SOTI confirm what the correct syntax should be for a request like this?