Skip to content

Bug: Undeclared parameter -EnableDebugMode in Deploy-ScheduledTasks.ps1 #2

@leonardokr

Description

@leonardokr

Description

Deploy-ScheduledTasks.ps1 references -EnableDebugMode in the README examples and uses it inside the Write-ScriptLog function, but the parameter is not declared in the param() block.

Steps to Reproduce

.\Scripts\TaskScheduler\Deploy-ScheduledTasks.ps1 -ComputerName "SRV01" -TaskDefinitionPath ".\task.xml" -EnableDebugMode

Expected: Script runs in debug mode.
Actual: Parameter binding error.

Fix

Add [switch]$EnableDebugMode to the param() block.

Files Affected

  • Scripts/TaskScheduler/Deploy-ScheduledTasks.ps1
  • Scripts/TaskScheduler/README.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions