From 6c733c80492f7ccfe945e3974ca8c4866fd7635d Mon Sep 17 00:00:00 2001 From: Ben Miller Date: Thu, 19 Jun 2025 19:24:08 -0600 Subject: [PATCH] foam_sync.ps1 (LIFEBALANCE) 2025-06-19T19:24:08Z --- foam_sync.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/foam_sync.ps1 b/foam_sync.ps1 index ae89132..76d4f41 100644 --- a/foam_sync.ps1 +++ b/foam_sync.ps1 @@ -69,7 +69,7 @@ try { } # Check Action - Write-Host "Checking action..." + Write-Verbose "Checking action..." $actionMatches = $false if ($currentAction -is [Microsoft.Management.Infrastructure.CimInstance] ` -and $currentAction.Execute -eq $taskExecute ` @@ -77,10 +77,13 @@ try { $actionMatches = $true } 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 + Write-Verbose "Checking principal..." $principalMatches = ($existingTask.Principal.UserId -eq $taskPrincipal.UserId) # Check Settings (specifically ExecutionTimeLimit for this change)