Hello, please i need to create a simple powershell script for check the last modified time of a folder, then if is upper 24 ours get an alert, and if is under 24 ours it's ok. I can get the last time but i don't know how to get the alert on sensor
Get-Item C:\prova | select LastWriteTime if $result { write-host "<prtg>" write-host "<result>" write-host "<channel>Ultima modifica</channel>" write-host "<value>$data</value>" write-host "</result>" write-host "<text>Error in logfile</text>" write-host "</prtg>" }
Add comment