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
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
ScheduledTaskresources (one to create a new scheduled task, the other one to remove old ones in the root) causes a conflict, since onlyTaskNameproperty is the key property.Verbose logs showing the problem
Suggested solution to the issue
Mark
TaskPathproperty as a key property.The DSC configuration that is used to reproduce the issue (as detailed as possible)
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