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
Hi there,
Please activate the "Write EXE result to disk" option in the sensor's settings and post the log files (Result of Sensor XXX.Data.txt and Result of Sensor XXX.txt) located on the corresponding probe under "C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)".
Best regards
Jun, 2018 - Permalink