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
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.
Test-TargetResource already does the property by property diff, so clobber and replace is fine. Thanks for the work on the resource. This was my next resource to get implemented, but I just got to testing it.
Ran into two issues using this resource: