This repository was archived by the owner on May 15, 2018. It is now read-only.

Description
Looks like the Set-TargetResource method isn't handling an existing scheduled task. Here's the repro, run directly instead of through the LCM:
ipmo 'C:\Program Files\WindowsPowerShell\Modules\StackExchangeResources\DSCResources\StackExchange_ScheduledTask' -Force
$testResourceProperties = @{
Name = 'testTask'
FilePath = 'C:\Temp\foo.ps1'
At = [DateTime]::Now.ToString()
Hours = 1
Daily = $true
Ensure = 'Present'
}
### Expect this to create the task: SUCCESS
Set-TargetResource @testResourceProperties -Verbose:$true
### Expect this to update the task: FAIL (Register-ScheduledJob : The scheduled job definition FIM Sync Daily Delta already exists in the job definition store.)
Set-TargetResource @testResourceProperties -Verbose:$true