New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Custom Powershell Script

Votes:

0

Your Vote:

Up

Down

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

custom-script-exe exchange-powershell powershell prtg remote-powershell

Created on Apr 20, 2020 1:44:22 PM by  Slothy (0) 1

Last change on Apr 22, 2020 6:59:31 AM by  Stephan Linke [Paessler Support]



1 Reply

Votes:

0

Your Vote:

Up

Down

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

[email protected]

Created on Apr 22, 2020 8:00:30 AM by  Andreas Günther [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.