dsccommunity / dsccommunity/ComputerManagementDsc
ScheduledTask: TaskPath should be a key property
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 338
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
Details of the scenario you tried and the problem that is occurring
We're in the process of moving scheduled tasks to a different path and we'd like to keep the names.
However, creating two ScheduledTask resources (one to create a new scheduled task, the other one to remove old ones in the root) causes a conflict, since only TaskName property is the key property.
Verbose logs showing the problem
Suggested solution to the issue
Mark TaskPath property as a key property.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
ScheduledTask "new_task" {
TaskName = "task_name"
TaskPath = "\NewPath"
Ensure = "Present"
...
}
ScheduledTask "old_task" {
TaskName = "task_name"
TaskPath = "\"
Ensure = "Absent"
...
}
Happy to submit a patch.
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
6.5.0.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ScheduledTask resource and its TaskName and TaskPath properties in the ComputerManagementDsc repository. Reproduce the two-resource PowerShell DSC configuration shown in the issue, then inspect the resource's key-property behavior. Done means tasks with the same name in different paths can be managed independently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100