diff --git a/foam_sync.ps1 b/foam_sync.ps1 index 3dae011..efe2287 100644 --- a/foam_sync.ps1 +++ b/foam_sync.ps1 @@ -76,10 +76,8 @@ try { Write-Host "Checking action..." $actionMatches = $false if ($currentAction -is [Microsoft.Management.Infrastructure.CimInstance] ` - -and $currentAction.PSObject.Properties['Execute'] ` -and $currentAction.Execute -eq $taskExecute ` - -and $currentAction.PSObject.Properties['Argument'] ` - -and $currentAction.Argument -eq $taskArguments) { + -and $currentAction.Arguments -eq $taskArguments) { $actionMatches = $true }