New-RDMTask
2025-01-30
New-RDMTask
SYNOPSIS
Create a new task.
SYNTAX
__AllParameterSets
New-RDMTask [-Name] <string> [-Entry] <Object> [-Comment <string>] [-Description <string>]
[-DueDate <datetime>] [-Priority <int>] [-SetTask] [-Status <string>] [-User <Object>]
[-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
Create a new task. It must have a name and be associated to an entry. 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 task.
EXAMPLES
EXAMPLE 1
PS C:> $task = New-RDMTask TaskName EntryName
Create a task named TaskName and associated with the entry EntryName. This task is not saved yet, so it is stored in $task.
EXAMPLE 2
PS C:> New-RDMTask -Name ATask -Entry AnEntry -Description 'What To Do' -Priority 10 -User AUsername -Status Assigned -SetTask
Create a task named ATask associated with the entry AnEntry. The task is assigned to AUsername and its status reflects it. It has a priority of 10 and a desciption of the task. This task is created in the data source.
EXAMPLE 3
PS C:> $task = (Get-RDMPrivateSession -Name APrivateEntry | New-RDMTask -Name ATask -Comment 'For me only' -DueDate 2022/1/1)
Create a task named ATask associated with the private entry APrivateEntry. The task is not assigned and its status is the default value 'Open'. Its due date is the fist day of the year 2022. This task is not saved yet, so it is stored in $task.
EXAMPLE 4
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 5
PS C:> $user = Get-RDMUser -Name Username; New-RDMTask -Name ATask -Entry AnEntry -User $user.Name -Status Assigned -SetTask
Save a newly created task named ATask and associated with AnEntry. The task is assigned to Username and its status reflects it.
PARAMETERS
-Comment
Add a comment to the task.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Description
Add the description to the task.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-DueDate
Add a deadline to accomplish the task.
Type: System.Nullable`1[System.DateTime]
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Entry
Entry the task is assigned to. It can be specified by ID, by name or by PSConnection. Entries in the private vault are accessible.
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: true
ValueFromPipeline: true
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
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Name
Name of the task.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Priority
Set the priority of the task. The default value is 1.
Type: System.Int32
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-SetTask
Save the task.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Status
Set the status of the task. By default, the status is Open.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
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. The data source must support users.
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
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.PSConnection
The entry obtained from Get-RDMSession or Get-RDMPrivateSession can be piped to the parameter Entry.
System.Object
OUTPUTS
RemoteDesktopManager.PowerShellModule.PSOutputObject.PSTask
NOTES
For more information, type "Get-Help New-RDMTask -detailed". For technical information, type "Get-Help New-RDMTask -full".