Functions don't work on the new version of PRTG (16.2.24.4666) with -MaximumRedirection 0. Works fine if you remove -MaximumRedirection 0 from the module.
PS C:\Users\username> $request = Invoke-WebRequest -Uri $url -MaximumRedirection 0 -ErrorAction Ignore
Invoke-WebRequest : Cannot bind parameter 'Uri'. Cannot convert value
"http:///api/setobjectproperty.htm?id=&name=&value=&" to type "System.Uri". Error: "Invalid URI: The hostname could
not be parsed."
At line:1 char:35
Functions don't work on the new version of PRTG (16.2.24.4666) with -MaximumRedirection 0. Works fine if you remove -MaximumRedirection 0 from the module.