NAME
Set-DcsTaskProperties
SYNOPSIS
Sets the properties of a task.
SYNTAX
Set-DcsTaskProperties -Task <Object> [ -NewName <String> ] [ -Description <String> ] [ -ActionDelay <TimeSpan> ] [ -RequireAllTriggers <Boolean> ] [ -MaxRunTime <TimeSpan> ] [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Sets the properties of a task. Specify the parameters to set or change.
PARAMETERS
- -Task<Object>
- TaskData object, name, or ID that identifies the task.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -NewName<String>
- Use this parameter to change the name of the task.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Description<String>
- Use this parameter to set a description of the task. To remove the description, use an empty string as the value; for example "".
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -ActionDelay<TimeSpan>
- Use this parameter to change the amount of time to wait before performing actions when triggers are signaled. The format of this parameter consists of decimals representing hours, minutes, and seconds, that are separated by colons. For instance, 01:05:30 would represent a delay of 1 hour, 5 minutes and 30 seconds. The maximum value is 2 hours.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -RequireAllTriggers<Boolean>
- Use this parameter to indicate whether to run the task when one trigger is met or to wait until all triggers are met. Specify $true to run the task when all triggers are met or $false to run the task when one trigger is met.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -MaxRunTime<TimeSpan>
- Use this parameter to change the amount of time allotted to perform all actions for each instance that the task is run. The time is shared by all actions in the task. When the time has been reached, all actions will be terminated. If triggered again, the same time will be allotted to perform the actions again. The format of this parameter consists of decimals representing days, hours, minutes, and seconds, that are separated by colons. For instance, 01:05:30:00 would represent a maximum run time of 1 day, 5 hours and 30 minutes. The maximum value is 7 days.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Connection<String>
- Alias of the connection to the server group. If not specified, the default connection is used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable<String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
TaskData : Object that identifies and describes the task.
OUTPUTS
TaskData : Object that identifies and describes the task.
NOTES
Also see Add-DcsTrigger, Add-DcsAction, Remove-DcsTask, Remove-DcsTrigger, Remove-DcsAction, Get-DcsTask.
EXAMPLES
Set-DcsTaskProperties -Task "Pool I/O Latency" -MaxRunTime 01:00:00:00
Sets the maximum runtime to be one day for the task named "Pool I/O Latency".
Description | : | |
Enabled | : | True |
ActionBehavior | : | RunPerTrigger |
MaxRunTime | : | 864000000000 |
Connective | : | LogicalOr |
ActionDelay | : | 0 |
State | : | Idle |
CurrentActionId | : | |
LastStartTime | : | 1/1/0001 12:00:00 AM |
LastStopTime | : | 1/1/0001 12:00:00 AM |
Id | : | 60411088-bc2c-450c-ace4-553688068b9f |
Caption | : | Pool I/O Latency |
ExtendedCaption | : | Pool I/O Latency |
Get-DcsTask | Set-DcsTaskProperties -MaxRunTime 01:00:00:00
The cmdlet Get-DcsTask is invoked to obtain the TaskData objects for all tasks. The data is piped to Set-DcsTaskProperties to set the maximum run time for all tasks to be one day (01:00:00:00).
Description | : | |
Enabled | : | True |
ActionBehavior | : | RunPerTrigger |
MaxRunTime | : | 864000000000 |
Connective | : | LogicalOr |
ActionDelay | : | 0 |
State | : | Idle |
CurrentActionId | : | |
LastStartTime | : | 1/1/0001 12:00:00 AM |
LastStopTime | : | 1/1/0001 12:00:00 AM |
Id | : | 9e302227-8ba5-4f6f-8d03-70e03a8f4387 |
Caption | : | Available Pool Space |
ExtendedCaption | : | Available Pool Space |
Internal | : | False |
Description | : | |
Enabled | : | True |
ActionBehavior | : | RunPerTrigger |
MaxRunTime | : | 864000000000 |
Connective | : | LogicalOr |
ActionDelay | : | 0 |
State | : | Idle |
CurrentActionId | : | |
LastStartTime | : | 1/1/0001 12:00:00 AM |
LastStopTime | : | 1/1/0001 12:00:00 AM |
Id | : | 60411088-bc2c-450c-ace4-553688068b9f |
Caption | : | Pool I/O Latency |
ExtendedCaption | : | Pool I/O Latency |
Internal | : | False |
Description | : | |
Enabled | : | True |
ActionBehavior | : | RunPerTrigger |
MaxRunTime | : | 864000000000 |
Connective | : | LogicalOr |
ActionDelay | : | 0 |
State | : | Idle |
CurrentActionId | : | |
LastStartTime | : | 1/1/0001 12:00:00 AM |
LastStopTime | : | 1/1/0001 12:00:00 AM |
Id | : | e618fb0c-09f6-4611-b2f7-c6ddabd4c048 |
Caption | : | Pool State Change |
ExtendedCaption | : | Pool State Change |
Internal | : | False |