Hi,
Im trying to run a script in PRTG that display how many mailboxes have Mailbox Auditing Enabled.
$Truecount = Get-Mailbox -filter {(servername -eq "<ommitted>" -or servername -eq "<ommitted>" -or servername -eq "<ommitted>") -and (AuditEnabled -eq $True)} | measure | % { $_.Count } Write-Host @" <prtg> <result> <channel>First channel</channel> <value>$Truecount</value> </result> </prtg> "@
The script runs perfectly on Both the EXCHANGE server and on the PRTG Probe
Here are the results
<prtg> <result> <channel>First channel</channel> <value>2</value> </result> </prtg>
But when i put the Sensor in PRTG i get the following error.
XML: XML Parser mismatch: Wanted </<<<>, got </prtg> -- JSON: The returned JSON does not match the expected structure (Invalid JSON.). (code: PE231)
I know its not the prettiest script (im a newbie), but surely the XML output is correct.
THanks
Add comment