Hi Guys and Gals,
I have setup a Custom EXE/Script sensor to run against our ageing Exchange server, but the script is bringing back a warning error as it runs as well as the correct response (the random 3 value). I was wondering if anyone knows how to ignore the warning messages or turn them off when running my script.
PowerShell Script
#Session setup
$session = New-PSSession -ConfigurationName Microsoft.exchange -ConnectionUri "http://<servername>/Powershell" -authentication Kerberos
Import-PSSession -Session $session -AllowClobber |out-null
#Exchange Powershell
Get-MailboxFolderStatistics -Identity <mailboxname> -FolderScope Inbox | Where-Object {$_.FolderPath -eq '/Inbox'} |foreach {$_.ItemsInFolder}
#End PSSession
Remove-PSSession -Session $session
The warning I get back from both running manually and via PRTG is
Response not well-formed: "(WARNING: The names of some imported commands from the module 'tmp_a1g1xqsf.5mm' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. 3 )" (code: PE132)
Thanks
Andy
Article Comments
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.
Hi there,
in order to have PRTG to be able to handle the data, it has to be well formatte. Please see this link for more information:
https://www.paessler.com/manuals/prtg/custom_sensors#advanced_sensors
Also the Script should run without any errors or warnings outside of PRTG.
Kind regards,
Andreas Günther
Tech Support, Paessler AG
support@paessler.com
Apr, 2020 - Permalink