> 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/receive-rdmmessage.md).

# Receive-RDMMessage

### Synopsis

Get messages associated with the current workspace for the actual user.

### Syntax

#### \_\_AllParameterSets

```
Receive-RDMMessage [-After <datetime>] [-Before <datetime>] [-CaseSensitive] [-Download]
 [-ExcludeRead] [-ExpiresOn <DateFilter>] [-Force] [-Folder <string>] [-From <string[]>]
 [-Group <string>] [-MarkAsRead] [-SentOn <DateFilter>] [-Subject <string[]>] [-Vault <Object>]
 [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### Description

Get messages associated with the current workspace for the actual user. By default, the fetched messages won't be marked as read. The workspace must be Devolutions Server or Devolutions Cloud. Devolutions Cloud allows to download only entries in the desired repository. Devolutions Server supports credentials, file and private entries. However, all entries will be saved in the user vault.

### Examples

#### Example 1

```powershell
PS C:\> $messages = Receive-RDMMessage -ExcludeRead; Receive-RDMMessage -From 'First Last' -ExcludeRead -MarkAsRead
```

Obtain all the unread messages. All of them will still be marked as unread upon reception. After reading them, the user mark as read the messages from First Last.

#### Example 2

```powershell
PS C:\> $messages = Receive-RDMMessage -SentOn Today -From Joe* -MarkAsRead
```

Obtain all the messages received today from every user whose name start with Joe (Joey LastName, Joelle LastName, Joe Blow, etc.). All of them will be marked as read upon reception.

#### Example 3

```powershell
PS C:\> $messages = Receive-RDMMessage -SentOn Today -Subject 'Required connections' -From 'FirstName LastName' -Download -Force -MarkAsRead
```

Obtain the message(s) sent today by 'FirstName LastName' whose subject is 'Requiered Connections'. The message(s) will be marked as read upon reception and all connections/attachments will be downloaded without a confirmation prompt in the user vault. The files will be stored in 'MyDocuments' and the entries will be in the root.

#### Example 4

```powershell
PS C:\> $messages = Receive-RDMMessage -SentOn Custom -ExpiresOn Custom -After 2000/01/01 -Before 2001/12/31
```

Obtain the messages that were sent and expired in 2000.

#### Example 5

```powershell
PS C:\> $messages = Receive-RDMMessage -From *LastName -Subject Subject? -CaseSensitive
```

Obtain all the messages from people whose name end with LastName and the subject is Subject followed by an another character (SubjectA, Subject1).

### Parameters

#### -After

Set the inclusive custom lower limit date for the ExpiresOn or SentOn parameter that is set to Custom. It will be set at the beginning of the day. If both ExpiresOn and SentOn are set to Custom, it will apply for both of them.

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

#### -Before

Set the inclusive custom upper limit date for the ExpiresOn or SentOn parameter that is set to Custom. It will be set at the end of the day. If both ExpiresOn and SentOn are set to Custom, it will apply for both of them.

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

#### -CaseSensitive

Parameters used will be case sensitive.

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

#### -Confirm

Prompts you for confirmation before running the cmdlet.

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

#### -Download

Download the connections and attachments in the message.

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

#### -ExcludeRead

Keep only the unread messages.

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

#### -ExpiresOn

Keep the messages that expire after the specified date. If set to Custom, After and Before parameters allows to define a specific interval.

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

#### -Folder

For Devolutions Server only. Specify the directory where the files will be downloaded. If not specied, it will be in 'MyDocuments'. In the event a file attachment shares a name with an existing file in the folder, the existing one will be overwritten.

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

#### -Force

Bypass the confirmation to proceed. If the DownloadAttachment switch is present, the attachments of all returned message will be downloaded.

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

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

#### -From

Filter the messages based on the senders.

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

#### -Group

For Devolutions Server only. Specify the group where the connections will be downloaded. If not specified, it will be in the root.

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

#### -MarkAsRead

All fetched messages will be marked as read.

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

#### -SentOn

Keep the messages that expire after the specified date. If set to Custom, After and Before parameters allows to define a specific interval.

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

#### -Subject

Filter the messages based on the subjects.

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

#### -Vault

For Devolutions Cloud only. Specify the vault where the entry will be saved.

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

#### -WhatIf

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

```yaml
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](https://go.microsoft.com/fwlink/?LinkID=113216).

### Notes

For more information, type "Get-Help Receive-RDMMessage -detailed". For technical information, type "Get-Help Receive-RDMMessage -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, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell/powershell-commands/receive-rdmmessage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
