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


Send ps script respons to prtg

Votes:

0

Your Vote:

Up

Down

How do i get the respons back to prtg to set the monitor to red if the valviu is "Files are different" and to grren when the valviu is "Files are the same"

$SourceDocs = Get-ChildItem –Path C:\Temp\EXE\am0ytil.exe | foreach {Get-FileHash –Path $_.FullName} $DestDocs = Get-ChildItem –Path C:\Temp\EXE1\am0ytil.exe | foreach {Get-FileHash –Path $_.FullName}

if(compare-object ($SourceDocs.Hash) ($DestDocs.Hash)){ Write-Host 'Files are different "2"' -fore red }else{ Write-Host 'Files are the same "0"' -fore green }

custom-sensor powershell prtg

Created on May 22, 2019 12:33:31 PM by  stjeped (0) 2



1 Reply

Votes:

0

Your Vote:

Up

Down

Hi there,

The output must match the format that PRTG expects.
Just to check, did you already review PRTG's File sensor which might suit your requirements here as well?

Best regards,
Sebastian

Created on May 24, 2019 10:51:48 AM by  Sebastian Kniege [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.