I can query the VPN users of our firewall via API-Call in Chrome.
https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000Clor
I would like to use result.content as XML in Powershell to work with the objects.
$url=https://localfirewall.domain.tld/api/?type=op&cmd=<show><global-protect-gateway><current-user></current-user></global-protect-gateway></show>&verysecretapikey=
$result=invoke-webrequest -uri $url -skipcertificatechek -method:get -contenttype "application/xml
$result.content
In PaloAlto's KB article you can see the output of the call in the browser.
$result.content -as [xml]should do