PowerShellOrg/StackExchangeResources — pull request #2 by craig-martin (2014-10-21 20:39:56+00:00)
Title: Fix for ScheduledTask - existing Job, and using Credentials

Ran into two issues using this resource:
1. The resource would fail in the LCM with access-denied, so I plumbed in the Credential parameter and used New-PSSession, like in Test-TargetResource
2. The Set-TargetResource would fail if the ScheduledTask already exists. I would usually do a property-by-property diff but took the lazy solution to just clobber the existing ScheduledTask, allowing the new one to be created.