> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell/powershell-commands/new-rdmtask.md).

# 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>]
```

### Description

Create a new task. It must have a name and be associated to an entry. This feature is only available for the following workspaces: Devolutions Server, Azure SQL, SQL Server, and SQLite. If the workspace 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

```powershell
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

```powershell
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 workspace.

#### Example 3

```powershell
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

```powershell
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

```powershell
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.

```yaml
Type: System.String
DefaultValue: ''
SupportsWildcards: false
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.

```yaml
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

Add a deadline to accomplish the task.

```yaml
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: ''
```

#### -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.

```yaml
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  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 no "No" option.
* Cancel: Cancel the yes/no/cancel prompt. "No" is the fallback option if there is no "Cancel" option.

```yaml
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

Name of the task.

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

#### -Priority

Set the priority of the task. The default value is 1.

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

#### -SetTask

Save the task.

```yaml
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: ''
```

#### -Status

Set the status of the task. By default, the status is Open.

```yaml
Type: System.String
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 their name, their email address, their ID or a PSUserInfo. The workspace must support users.

```yaml
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
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](https://go.microsoft.com/fwlink/?LinkID=113216).

### Inputs

#### RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection

The entry obtained from Get-RDMSession or Get-RDMPrivateSession can be piped to the parameter Entry.

### Notes

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/powershell/powershell-commands/new-rdmtask.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
