PowerShell Logo Small

Set-ClusteredScheduledTask



This is the built-in help made by Microsoft for the command 'Set-ClusteredScheduledTask', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Changes settings for a clustered scheduled task.

SYNTAX


Set-ClusteredScheduledTask [-TaskName] <String> [[-Action] <CimInstance[]>] [[-Trigger] <CimInstance[]>] [[-Settings] <CimInstance>] [[-Description] <String>] [[-Cluster]
<String>] [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Set-ClusteredScheduledTask [-TaskName] <String> [-InputObject] <CimInstance> [[-Cluster] <String>] [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>]
[<CommonParameters>]
Set-ClusteredScheduledTask [-TaskName] <String> [-Xml] <String> [[-Cluster] <String>] [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-ClusteredScheduledTask cmdlet changes settings for a clustered scheduled task. For instance, you can change the actions or triggers associated with a task.


You can make changes to a task even if an instance of the task is currently running. Any changes do not affect any actions already initiated.


For more information about the Task Scheduler, see the Task Scheduler Overview topic in the TechNet Library at http://technet.microsoft.com/en-us/library/cc721871.aspx.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=287558
New-ScheduledTaskAction
New-ScheduledTaskTrigger
New-ScheduledTaskSettingsSet
Get-ClusteredScheduledTask
Register-ClusteredScheduledTask
Unregister-ClusteredScheduledTask

REMARKS

<

Examples


Example 1: Change actions for a task

PS C:\> $Action01 = New-ScheduledTaskAction -Execute Notepad
PS C:\> $Action02 = New-ScheduledTaskAction -Execute Calc
PS C:\> Set-ClusteredScheduledTask -TaskName "Task03" -Action $Action01,$Action02



This example changes the task actions for a scheduled task.

The first command uses the New-ScheduledTaskAction cmdlet to create a task action and stores that action in the $Action01 variable.

The second command uses the New-ScheduledTaskAction cmdlet to create a task action and stores that action in the $Action02 variable.

The final command changes the action assigned to the task named Task03 to the the two actions stored in $Action01 and $Action02. The cluster runs more than one action in
sequence.