From a0a4265e2b61432613c3bade790b7f72f6d4d8c3 Mon Sep 17 00:00:00 2001 From: Willem D'Haese Date: Thu, 31 Oct 2019 10:20:55 +0100 Subject: [PATCH] Update check_ms_win_tasks.ps1 Added '0x800710E0' to RunningTasks --- check_ms_win_tasks.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/check_ms_win_tasks.ps1 b/check_ms_win_tasks.ps1 index ee9bad2..c6b8e8d 100644 --- a/check_ms_win_tasks.ps1 +++ b/check_ms_win_tasks.ps1 @@ -1,5 +1,5 @@ # Script name: check_ms_win_tasks.ps1 -# Version: v7.05.190623 +# Version: v7.06.191031 # Created on: 01/02/2014 # Author: Willem D'Haese # Purpose: Checks Microsoft Windows enabled scheduled tasks excluding defined folders and task patterns, returning state of tasks @@ -568,9 +568,10 @@ Function Select-TaskInfo { } } } - ElseIf ( $ObjTask.LastTaskResult -eq '0x8004131F'-or $ObjTask.LastTaskResult -eq '0x00041301' -and $ObjTask.Enabled ) { + ElseIf ( $ObjTask.LastTaskResult -eq '0x8004131F' -or $ObjTask.LastTaskResult -eq '0x00041301' -or $ObjTask.LastTaskResult -eq '0x800710E0' -and $ObjTask.Enabled ) { # 0x00041301 => The task is currently running -# 0x8004131F => An instance of this task is already running. +# 0x8004131F => An instance of this task is already running +# 0x800710E0 => The operator or administrator has refused the request If ( ! $Struct.InclTasks ) { If ( ! ( Compare-Array -Str $ObjTask.Name -Patterns $Struct.ExclTasks ) ) { $Struct.RunningTasks += $ObjTask