Set-RDMTask

Synopsis

Save or update a task.

Syntax

__AllParameterSets

Set-RDMTask [-Task] <PSTask> [-Comment <string>] [-Description <string>] [-DueDate <datetime>]
 [-Force] [-Name <string>] [-Priority <int>] [-Status <string>] [-UnassignUser] [-User <Object>]
 [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Save or update a task of the current data source. This feature is only available for the following data sources: Devolutions Server, Azure SQL, SQL Server, and SQLite. If the data source does not support users, the parameter User will be simply ignored. If a virtual folder is involved, the user must have the add and edit rights to save the tasks. To modify fields, this cmdlet parameters can be used or the PSTask can be modified directly. The confirmation impact (ConfirmImpact) is low.

Examples

Example 1

PS C:\> Get-RDMTask -Name ATask | Set-RDMTask -Comment "Task completed" -Status Closed

Add the comment "Task completed" to task ATask and close it. If the name is not unique, all tasks named ATask will have the modifications.

Example 2

PS C:\> New-RDMTask -Name ATask -Entry AnEntry | Set-RDMTask -Force

Save a newly created task named ATask and associated with AnEntry without any confirmation prompt.

Example 3

PS C:\> $user = Get-RDMUser -Name AUser; Get-RDMTask -Status Assigned -User $user | Set-RDMTask -UnassignUser

Unassign all the tasks assigned the user AUser.

Example 4

PS C:\> $task = Get-RDMTask -Name ATask; $task.Task.CustomField1 = "Whatever"; Set-RDMTask $task

Store the uniquely named task ATask in $task. Add a value to the CustomField1 and save the modification using the only positional parameter.

Example 5

PS C:\> Get-RDMTask -Name ATask | Set-RDMTask $task -WhatIf -Verbose -Description 'NewDesc' -DueDate 2023/1/1 -Priority 3

Using the WhatIf and Verbose parameters, it will allow to determine if the task is created or updated and where exactly (data source name &gt; entry name &gt; task name). No modification will happen.

Parameters

-Comment

Modify the comment of the task.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Description

Modify the description of the task.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-DueDate

Specify the deadline to accomplish the task.

Type: System.Nullable`1[System.DateTime]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Force

The task will be saved or created without confirmation.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ForcePromptAnswer

Switch to use with caution. It will automatically answer prompt asking yes/no, yes/no/cancel, or ok/cancel questions. In case of multiple prompts, multiple values can be passed to this parameter. Here are the accepted values:

  • Yes: Accept the prompt. Cover the OK and Automatic value.

  • No: Refuse the yes/no/cancel prompt. Cancel is the fallback option if there is not an option No.

  • Cancel: Cancel the yes/no/cancel prompt. No is the fallback option if there is not an option Cancel.

Type: System.Windows.Forms.DialogResult[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Name

New name for the task.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Priority

Modify the priority of the task.

Type: System.Nullable`1[System.Int32]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Status

Modify the status of the task.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Task

Task to add or modify.

Type: RemoteDesktopManager.PowerShellModule.PSOutputObject.PSTask
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-UnassignUser

Remove the user assigned to the task.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-User

Assign this user to the task. The user can be specified with his name, his email address, his ID or a PSUserInfo.

Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

RemoteDesktopManager.PowerShellModule.PSOutputObject.PSTask

The task obtained from Get-RDMTask can be piped to the parameter Task.

Notes

For more information, type "Get-Help Set-RDMTask -detailed". For technical information, type "Get-Help Set-RDMTask -full".

Devolutions Forum logo Donnez-nous vos commentaires