Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Windows Task Scheduler
Windows Task Scheduler

Windows Task Scheduler

Peter Barendse

|
1,572 installs
| (13) | Free
Schedule and maintain tasks in the Windows Task Scheduler. (Only supports Windows 8, Windows 2012 and higher)
Get it free

Windows Task Scheduler

The Windows Task Scheduler makes it possible to create and alter scheduled tasks on Windows 2012, Windows 8 and higher, using WinRM to connect to the server. Older Windows version are not supported, because they are missing the ScheduledTasks cmdlet.

The task provides the following functionality

  • Connect to a remote host using WinRM (Agent Pool), or create a local connection (Deployment Group).

    • Server(s): Connect to one or several servers. Server names need to be comma separated.
    • Username: The user needs to be a local administrator on the server. Only local admins are allowed to created scheduled tasks.
    • Password: Matching password for the local admin.
  • Manual task creation

    • Create a new task
      • Task Name (folder\taskname)
      • Task Description
      • Task Actions (Multiple action per task are supported. One action per line)
      • Task can be enabled or disabled.
      • Trigger schedule (Run a task immediately, once, daily or days per week)
      • A task can run and be removed immediately after creation.
      • Start time
      • Trigger interval (Picklist can be altered. Minutes, hours and days are supported)
      • Trigger repetition (Picklist can be altered. Minutes and hours are supported)
      • Security -> runas domain\user*
    • Alter existing task
      • A task can be altered with all the options listed above.

[*] Username/Password, System accounts (NT AUTHORITY\SYSTEM for example) and group managed service accounts (gMSA) are supported. gMSA accounts are recognized by the $ behind the username. i.e. domain\gsmauser$

  • Create a task based on XML files

    • Task Name (folder\taskname)
    • XML location

    XML location can be either 1 file $(System.DefaultWorkingDirectory)\schedulers\task1.xml or a wildcard selection $(System.DefaultWorkingDirectory)\schedulers\*.xml

The XML file can be exported with Powershell (https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/export-scheduledtask), or you can open the task scheduler in windows, right-click the task you want to export and select export.

Using gMSA in a XML is possible. The XML needs to contain the following information for that:

<Principals>
    <Principal>
        <LogonType>Password</LogonType>
        <UserId>DOMAIN\UserName$</UserId>
    </Principal>
</Principals>

Changelog

v5 changes

  • Possibilty to keep the state of the scheduled task as it currently sits on the server (enabled or disabled)

v4 changes

  • gMSA support
  • Cleaner interface for deploment group usage
  • Wildcard usage for the XML location

v3 changes

  • Added XML file support. This is a handy feature for importing tasks that need settings that the 'manual' creation of this task doesn't support.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft