I’d have to test more specifically with PowerShell, but it must be noted that the default output is XML and not JSON. It may help to modify your URI to optionally output as JSON:
$uri = ‘https://servername:52311/api/query?relevance=(name of it, last report time of it) of bes computers&output=json’