Skip to content

Commit

Permalink
Update check_ms_win_tasks.ps1
Browse files Browse the repository at this point in the history
Added '0x800710E0' to RunningTasks
  • Loading branch information
willemdh authored Oct 31, 2019
1 parent b153475 commit a0a4265
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions check_ms_win_tasks.ps1
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a0a4265

Please sign in to comment.