I know it isn't optimal. But still, had it worked server-side I would have tried to optimize
the code. Perhaps filtering accounts beforehand and only resorting to the GET requests when
every other possibility had failed. And of course, running the collector with the script much
less often than other collectors.

But anyways, I'm back to the powershell script. It works, as far as I have tested it. Here is the
source in case anyone is interested: https://gitlab.com/snippets/1809902