PowerShell Logo Small

Register-ClusteredScheduledTask



This is the built-in help made by Microsoft for the command 'Register-ClusteredScheduledTask', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 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

Registers a scheduled task on a failover cluster.

SYNTAX


Register-ClusteredScheduledTask [-TaskName] <String> [[-TaskType] <ClusterTaskTypeEnum>] [-Action] <CimInstance[]> [[-Trigger]
<CimInstance[]>] [[-Settings] <CimInstance>] [[-Description] <String>] [[-Cluster] <String>] [[-Resource] <String>] [-AsJob
[<SwitchParameter>]] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Register-ClusteredScheduledTask [-TaskName] <String> [[-TaskType] <ClusterTaskTypeEnum>] [-InputObject] <CimInstance> [[-Cluster] <String>]
[[-Resource] <String>] [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Register-ClusteredScheduledTask [-TaskName] <String> [[-TaskType] <ClusterTaskTypeEnum>] [-Xml] <String> [[-Cluster] <String>] [[-Resource]
<String>] [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Register-ClusteredScheduledTask cmdlet registers a clustered scheduled task on a failover cluster. The new task runs scheduled actions as
defined by task triggers. As specified in the TaskType parameter, an action runs on a resource specific node, an active failover node, or on
all cluster nodes.


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



<

RELATED LINKS

New-ScheduledTaskAction
New-ScheduledTaskTrigger
New-ScheduledTaskSettingsSet
Get-ClusteredScheduledTask
Set-ClusteredScheduledTask
Unregister-ClusteredScheduledTask

REMARKS

<

Examples


Example 1: Register a task on a cluster

PS C:\>$Action = New-ScheduledTaskAction -Execute CalcPS C:\>$Trigger = New-ScheduledTaskTrigger -At 12:00 -OncePS
C:\>Register-ClusteredScheduledTask -TaskName "CalcTask01" -TaskType ClusterWide -Action $Action -Trigger $Trigger -Cluster "Cluster01"



This example registers a cluster-wide task.

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

The second command uses the New-ScheduledTaskTrigger cmdlet to create a task trigger and stores that trigger in the $Trigger variable.

The final command registers a scheduled task named CalcTask01 for all cluster nodes in the cluster Cluster01. The task uses the action and
trigger stored in the two variables.




Example 2: Register a task on the current cluster

PS C:\>$Action = New-ScheduledTaskAction -Execute CalcPS C:\>$Trigger = New-ScheduledTaskTrigger -At 12:00 -OncePS
C:\>Register-ClusteredScheduledTask -TaskName "CalcTask02" -TaskType AnyNode -Action $Action -Trigger $Trigger



This example registers an active cluster nodes scheduled task.

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

The second command uses the New-ScheduledTaskTrigger cmdlet to create a task trigger and stores that trigger in the $Trigger variable.

The final command registers a scheduled task named CalcTask02 for active cluster nodes. Because the command does not specify a cluster, it
uses the current cluster. The task uses the action and trigger stored in the two variables.