PowerShellOrg / StackExchangeResources

DSC Resources from Stack Exchange
MIT License
13 stars 8 forks source link

Fix for ScheduledTask - existing Job, and using Credentials #2

Closed craig-martin closed 10 years ago

craig-martin commented 10 years ago

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.
smurawski commented 10 years ago

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.