dsccommunity / ComputerManagementDsc

DSC resources for for configuration of a Windows computer. These DSC resources allow you to perform computer management tasks, such as renaming the computer, joining a domain and scheduling tasks as well as configuring items such as virtual memory, event logs, time zones and power settings.
https://dsccommunity.org
MIT License
303 stars 83 forks source link

Fix mismatch between user and builtinaccount #387

Closed nickgw closed 1 year ago

nickgw commented 2 years ago

Currently ScheduledTask conflates the param BuiltInAccount and *-ScheduledTask cmdlet's user parameter. This fixes that.

Pull Request (PR) description

Currently ScheduledTask conflates the param BuiltInAccount and *-ScheduledTask cmdlet's user parameter. This fixes that.

This Pull Request (PR) fixes the following issues

Task list


This change is Reviewable

codecov[bot] commented 2 years ago

Codecov Report

Merging #387 (73dce2d) into main (3aea926) will increase coverage by 0%. The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #387   +/-   ##
===================================
  Coverage    90%    90%           
===================================
  Files        17     17           
  Lines      1716   1726   +10     
===================================
+ Hits       1554   1564   +10     
  Misses      162    162           
Impacted Files Coverage Δ
...Resources/DSC_ScheduledTask/DSC_ScheduledTask.psm1 87% <100%> (+<1%) :arrow_up:
nickgw commented 2 years ago

@PlagueHO This should be good to go now, when you get a chance to check it out!

ShawnHardwick commented 2 years ago

Should the MOF schema be updated to match this as well?

https://github.com/dsccommunity/ComputerManagementDsc/blob/main/source/DSCResources/DSC_ScheduledTask/DSC_ScheduledTask.schema.mof#L16

nickgw commented 2 years ago

Should the MOF schema be updated to match this as well?

https://github.com/dsccommunity/ComputerManagementDsc/blob/main/source/DSCResources/DSC_ScheduledTask/DSC_ScheduledTask.schema.mof#L16

The inputs don't actually change. The code was comparing the wrong properties.

PlagueHO commented 2 years ago

Hi @nickgw - sorry was tied up on other things. I'll get onto this close to the end of the week. Just need to try and avoid breaking Windows Server 2016 (unfortunately we can't test on it at the moment unless we get something like TK going in Azure).

nickgw commented 2 years ago

Hey @PlagueHO just bumping this (and my related comments in the issue) when you get a chance!

nickgw commented 1 year ago

@PlagueHO Do you mind taking another look at this? I've added another test.

nickgw commented 1 year ago

@PlagueHO do you mind taking another look at this? I'd love to close this off my list.

PlagueHO commented 1 year ago

Cool! Thanks @nickgw - I'll review tonight.

nickgw commented 1 year ago

@PlagueHO I think I hit all your comments!