foam_sync.ps1 (LIFEBALANCE) 2025-06-19T19:24:08Z
This commit is contained in:
@ -69,7 +69,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Check Action
|
# Check Action
|
||||||
Write-Host "Checking action..."
|
Write-Verbose "Checking action..."
|
||||||
$actionMatches = $false
|
$actionMatches = $false
|
||||||
if ($currentAction -is [Microsoft.Management.Infrastructure.CimInstance] `
|
if ($currentAction -is [Microsoft.Management.Infrastructure.CimInstance] `
|
||||||
-and $currentAction.Execute -eq $taskExecute `
|
-and $currentAction.Execute -eq $taskExecute `
|
||||||
@ -77,10 +77,13 @@ try {
|
|||||||
$actionMatches = $true
|
$actionMatches = $true
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Warning "action does not match:`n $(Compare-Object -IncludeEqual -ReferenceObject $currentAction -DifferenceObject $action)"
|
Write-Warning "action does not match:"
|
||||||
|
Write-Warning " Current action: $($currentAction.Execute) $($currentAction.Arguments)"
|
||||||
|
Write-Warning " Expected action: $taskExecute $taskArguments"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check Principal
|
# Check Principal
|
||||||
|
Write-Verbose "Checking principal..."
|
||||||
$principalMatches = ($existingTask.Principal.UserId -eq $taskPrincipal.UserId)
|
$principalMatches = ($existingTask.Principal.UserId -eq $taskPrincipal.UserId)
|
||||||
|
|
||||||
# Check Settings (specifically ExecutionTimeLimit for this change)
|
# Check Settings (specifically ExecutionTimeLimit for this change)
|
||||||
|
|||||||
Reference in New Issue
Block a user