Hi,
i'm trying to get get PRTG to execute a Powershell Script to return the number of unregistered XenDesktops. The Script is working without PRTG but wihin PRTG i only get an error message. The weird part is that the Error Message evreytime is Error:PU132*(Code: PE132*), except the * are the real Values from the script. For example if i have 4 unregistered machines i get the message Error: PU1324 (Code: PE1324).
Am i doing anything wrong? Here is the script:
asnp citrix.broker* $unregistered = Get-BrokerDesktop -SummaryState Unregistered $unregisteredcount = @($unregistered).Count if ($unregisteredcount -eq 1) { $unregisteredcount = 0; } write-host $($unregisteredcount)
The if-Sequnece in the middle i'm using because the script always returns atleast 1.
Add comment