Vitor Santos Posted September 23, 2020 Share Posted September 23, 2020 Hello folks, We had a request from a client where he had the need to monitor some important scheduled task(s). While checking the documentation, we wanted to avoid the procedure on the actual 'Job Monitor' for scheduled tasks (since the clients is kind of harsh when it comes to make changes in their boxes, even if those represent no harm). Since we were only interested in the actual task return code (after its run), we've done a quick DS (powershell). Just sharing it here in case it's useful for anyone. GitHub repo -> Here For now, we're alarming on the actual task return code != 0. Since MS advises that anything differing from that represents some sort of issue. However, if you've any ideas/improvements just let me know Thank you! Quote Link to comment Share on other sites More sharing options...
Vitor Santos Posted September 23, 2020 Author Share Posted September 23, 2020 Updated the actual code since the task ExitCode was being output as Decimal & it's easier to present it as HEX on the actual alarm message. To accomplish that, I've added a function that makes use of LM API & maps a custom property at the instance level (this way we can then reference it in the actual alarm message -> converted to HEX). Hope it's useful for anyone Quote Link to comment Share on other sites More sharing options...
Vitor Santos Posted September 24, 2020 Author Share Posted September 24, 2020 I have updated the actual DS.. Realized that it wasn't getting data from the actual endpoint in context. I was running PS commands locally (so it was always retrieving data from the Collector ). I've re-wrote it in order to use 'Invoke-Command' & this way it seems to be getting data for each device in context. Updated the GitHub repo Quote Link to comment Share on other sites More sharing options...
Chris Good Posted May 11, 2021 Share Posted May 11, 2021 I am having issues when I try to use your Data Collection script for this. The discovery works fine. When doing the data collection, it times out with no results. I do have my company defined in the URI. Can you please point me in the right direction? Quote Link to comment Share on other sites More sharing options...
irievibe Posted July 19 Share Posted July 19 It seems that github repo is no longer valid? I am looking for a way to monitor windows scheduled tasks. Let me know if this is still out there somewhere and thanks for posting! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.