aaronengels / DattoRMM

A PowerShell module that connects to the Datto RMM API
GNU General Public License v3.0
64 stars 23 forks source link

Set-DrmmSite #36

Closed schlreki closed 1 year ago

schlreki commented 1 year ago

If the site name contains äöüÖÄÜ or special characters, an error (400) Invalid request is returned.

schlreki commented 1 year ago

update from 1.0.0.29 to 1.0.0.30 after this New-ApiRequest : Der Remoteserver hat einen Fehler zurückgegeben: (400) Ungültige Anforderung. In C:\Users\René\OneDrive\Dokumente\WindowsPowerShell\Modules\DattoRMM\1.0.0.30\functions\Set-DrmmSite.ps1:64 Zeichen:9

aaronengels commented 1 year ago

I'll look into this, use the 10.0.0.29 version for now, thank you for reporting this.

phill-holbrook commented 1 year ago

This should be fixed in #37

phill-holbrook commented 1 year ago

FYI - this problem existed for a while (perhaps always?) due to the request body not being UTF8 encoded. However, until recently, an unalarming message would be written to the output stream in the event of an error rather than an actual error being raised to the error stream. I confirmed this by testing in version 1.0.0.28:

> $site | select name

name
----
Speciäl Character Test

> Set-DrmmSite -siteUid $site.uid -siteDescription "This is a test" -siteName $site.name
The remote server returned an error: (400) Bad Request.
schlreki commented 1 year ago

Works great thx René