caught out by syntax
This commit is contained in:
parent
2fc0cec990
commit
c2ba569bf4
1 changed files with 3 additions and 2 deletions
|
@ -50,8 +50,8 @@ else
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$tasks = Get-ScheduledTask -TaskPath $name
|
$tasks = Get-ScheduledTask -TaskPath $name
|
||||||
$tasks_needing_changing |? { $_.State -ne $state }
|
$tasks_needing_changing = $tasks |? { $_.State -ne $state }
|
||||||
if ($tasks_needing_changing -eq $null)
|
if (-not($tasks_needing_changing -eq $null))
|
||||||
{
|
{
|
||||||
if ($state -eq 'Disabled')
|
if ($state -eq 'Disabled')
|
||||||
{
|
{
|
||||||
|
@ -69,6 +69,7 @@ try
|
||||||
Set-Attr $result "tasks_changed" @()
|
Set-Attr $result "tasks_changed" @()
|
||||||
$result.changed = $false
|
$result.changed = $false
|
||||||
}
|
}
|
||||||
|
|
||||||
Exit-Json $result;
|
Exit-Json $result;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
Loading…
Add table
Reference in a new issue