Skip to content

ScheduledTask: TaskPath should be a key property #254

Description

@bozho

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThe issue is a discussion.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions