Resource Type: dsc_scheduledtask

Defined in:
lib/puppet/type/dsc_scheduledtask.rb
Providers:
powershell

Overview

The DSC ScheduledTask resource type. Automatically generated from ‘ComputerManagementDsc/DSCResources/MSFT_ScheduledTask/MSFT_ScheduledTask.schema.mof’

To learn more about PowerShell Desired State Configuration, please visit technet.microsoft.com/en-us/library/dn249912.aspx.

For more information about built-in DSC Resources, please visit technet.microsoft.com/en-us/library/dn249921.aspx.

For more information about xDsc Resources, please visit github.com/PowerShell/DscResources.

Properties

  • ensure

    The basic property that the resource should be in.

    Supported values:
    • exists?
    • present
    • absent

Parameters

  • dsc_actionarguments

    ActionArguments - The arguments to pass the executable

  • dsc_actionexecutable

    ActionExecutable - The path to the .exe for this task

  • dsc_actionworkingpath

    ActionWorkingPath - The working path to specify for the executable

  • dsc_allowstartifonbatteries

    AllowStartIfOnBatteries - Indicates whether the task should start if the machine is on batteries or not. Defaults to $false

    Supported values:
    • true
    • false
  • dsc_compatibility

    Compatibility - The task compatibility level. Defaults to Vista. Valid values are AT, V1, Vista, Win7, Win8.

  • dsc_daysinterval

    DaysInterval - Specifies the interval between the days in the schedule. An interval of 1 produces a daily schedule. An interval of 2 produces an every-other day schedule.

  • dsc_daysofweek

    DaysOfWeek - Specifies an array of the days of the week on which Task Scheduler runs the task.

  • dsc_delay

    Delay - Specifies a delay to the start of the trigger. The delay is a static delay before the task is executed. Can only be used in combination with ScheduleType OnEvent

  • dsc_description

    Description - The task description

  • dsc_disallowdemandstart

    DisallowDemandStart - Indicates whether the task is prohibited to run on demand or not. Defaults to $false

    Supported values:
    • true
    • false
  • dsc_disallowhardterminate

    DisallowHardTerminate - Indicates whether the task is prohibited to be terminated or not. Defaults to $false

    Supported values:
    • true
    • false
  • dsc_disallowstartonremoteappsession

    DisallowStartOnRemoteAppSession - Indicates that the task does not start if the task is triggered to run in a Remote Applications Integrated Locally (RAIL) session.

    Supported values:
    • true
    • false
  • dsc_dontstopifgoingonbatteries

    DontStopIfGoingOnBatteries - Indicates that the task does not stop if the computer switches to battery power.

    Supported values:
    • true
    • false
  • dsc_dontstoponidleend

    DontStopOnIdleEnd - Indicates that Task Scheduler does not terminate the task if the idle condition ends before the task is completed.

    Supported values:
    • true
    • false
  • dsc_enable

    Enable - True if the task should be enabled, false if it should be disabled

    Supported values:
    • true
    • false
  • dsc_ensure

    Ensure - Present if the task should exist, Absent if it should be removed Valid values are Present, Absent.

  • dsc_eventsubscription

    EventSubscription - Specifies the EventSubscription in XML. This can be easily generated using the Windows Eventlog Viewer. For the query schema please check: docs.microsoft.com/en-us/windows/desktop/WES/queryschema-schema. Can only be used in combination with ScheduleType OnEvent

  • dsc_executeascredential

    ExecuteAsCredential - The credential this task should execute as. If not specified defaults to running as the local system account

  • dsc_executeasgmsa

    ExecuteAsGMSA - The gMSA (Group Managed Service Account) this task should execute as. Cannot be used in combination with ExecuteAsCredential.

  • dsc_executiontimelimit

    ExecutionTimeLimit - Specifies the amount of time that Task Scheduler is allowed to complete the task.

  • dsc_hidden

    Hidden - Indicates that the task is hidden in the Task Scheduler UI.

    Supported values:
    • true
    • false
  • dsc_idleduration

    IdleDuration - Specifies the amount of time that the computer must be in an idle state before Task Scheduler runs the task.

  • dsc_idlewaittimeout

    IdleWaitTimeout - Specifies the amount of time that Task Scheduler waits for an idle condition to occur.

  • dsc_logontype

    LogonType - Specifies the security logon method that Task Scheduler uses to run the tasks that are associated with the principal. Valid values are Group, Interactive, InteractiveOrPassword, None, Password, S4U, ServiceAccount.

  • dsc_multipleinstances

    MultipleInstances - Specifies the policy that defines how Task Scheduler handles multiple instances of the task. Valid values are IgnoreNew, Parallel, Queue.

  • dsc_networkname

    NetworkName - Specifies the name of a network profile that Task Scheduler uses to determine if the task can run. The Task Scheduler UI uses this setting for display purposes. Specify a network name if you specify the RunOnlyIfNetworkAvailable parameter.

  • dsc_priority

    Priority - Specifies the priority level of the task. Priority must be an integer from 0 (highest priority) to 10 (lowest priority). The default value is 7. Priority levels 7 and 8 are used for background tasks. Priority levels 4, 5, and 6 are used for interactive tasks.

  • dsc_psdscrunascredential

    PsDscRunAsCredential

  • dsc_randomdelay

    RandomDelay - Specifies a random amount of time to delay the start time of the trigger. The delay time is a random time between the time the task triggers and the time that you specify in this setting.

  • dsc_repeatinterval

    RepeatInterval - How many units (minutes, hours, days) between each run of this task?

  • dsc_repetitionduration

    RepetitionDuration - Specifies how long the repetition pattern repeats after the task starts. May be set to ‘Indefinitely` to specify an indefinite duration.

  • dsc_restartcount

    RestartCount - Specifies the number of times that Task Scheduler attempts to restart the task.

  • dsc_restartinterval

    RestartInterval - Specifies the amount of time that Task Scheduler attempts to restart the task.

  • dsc_restartonidle

    RestartOnIdle - Indicates that Task Scheduler restarts the task when the computer cycles into an idle condition more than once.

    Supported values:
    • true
    • false
  • dsc_runlevel

    RunLevel - Specifies the level of user rights that Task Scheduler uses to run the tasks that are associated with the principal. Defaults to ‘Limited’. Valid values are Limited, Highest.

  • dsc_runonlyifidle

    RunOnlyIfIdle - Indicates that Task Scheduler runs the task only when the computer is idle.

    Supported values:
    • true
    • false
  • dsc_runonlyifnetworkavailable

    RunOnlyIfNetworkAvailable - Indicates that Task Scheduler runs the task only when a network is available. Task Scheduler uses the NetworkID parameter and NetworkName parameter that you specify in this cmdlet to determine if the network is available.

    Supported values:
    • true
    • false
  • dsc_scheduletype

    ScheduleType - When should the task be executed Valid values are Once, Daily, Weekly, AtStartup, AtLogOn, OnEvent.

  • dsc_starttime

    StartTime - The time of day this task should start at - defaults to 12:00 AM. Not valid for AtLogon and AtStartup tasks

  • dsc_startwhenavailable

    StartWhenAvailable - Indicates that Task Scheduler can start the task at any time after its scheduled time has passed.

    Supported values:
    • true
    • false
  • dsc_synchronizeacrosstimezone

    SynchronizeAcrossTimeZone - Enable the scheduled task option to synchronize across time zones. This is enabled by including the timezone offset in the scheduled task trigger. Defaults to false which does not include the timezone offset.

    Supported values:
    • true
    • false
  • dsc_taskname

    TaskName - The name of the task

  • dsc_taskpath

    TaskPath - The path to the task - defaults to the root directory

  • dsc_user

    User - Specifies the identifier of the user for a trigger that starts a task when a user logs on.

  • dsc_waketorun

    WakeToRun - Indicates that Task Scheduler wakes the computer before it runs the task.

    Supported values:
    • true
    • false
  • dsc_weeksinterval

    WeeksInterval - Specifies the interval between the weeks in the schedule. An interval of 1 produces a weekly schedule. An interval of 2 produces an every-other week schedule.

  • name (namevar)
  • provider

    The specific backend to use for this ‘dsc_scheduledtask` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.