> 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/send-rdmmessagebyshareablelink.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Send-RDMMessageByShareableLink

Send-RDMMessageByShareableLink uses Devolutions Send to generate a shareable link to an encrypted secure message.

### Synopsis

Generate a shareable link to a message

### Syntax

#### \_\_AllParameterSets

```
Send-RDMMessageByShareableLink [-Body] <string> [[-Passphrase] <string>]
 [[-Duration] <PSSendLinkDurationWrapper>] [[-ViewLimit] <int>] [-AllowRecipientToDeleteMessage]
 [-Attachment <PSConnectionAttachment[]>] [-Connection <PSConnection[]>] [-FilePath <string[]>]
 [-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]
```

### Description

Use Devolutions Send to generate a link to a message. This cmdlet works with any workspace type, as long as Devolutions Send is enabled for the workspace. On a Devolutions Server workspace, the server must also allow Internet access.

### Examples

```powershell
PS C:\> $link = Send-RDMMessageByShareableLink -Body 'A special message' -Passphrase 654321 -Duration 5 -AllowRecipientToDeleteMessage -ViewLimit 10
PS C:\> $link
```

Store the created shareable link to the encrypted message 'A special message' in the variable $link. The link will be valid for 5 days or 10 views. To decrypt the message, the recipient will have to use the passphrase.

```powershell
PS C:\> $attachment = Get-RDMEntry -name "EntryWithAttachment" | Get-RDMEntryAttachment -Title "My attachment"
PS C:\> $link = Send-RDMMessageByShareableLink -Body 'A special message' -Attachment $attachment
PS C:\> $link
```

Store the created shareable link to the message 'A special message' in the variable $link. The link will contain a selected entry's attachment as a downloadable file.

```powershell
PS C:\> $document = Get-RDMEntry -name "MyDocument"
PS C:\> $userVaultEntry = Get-RDMPrivateSession -Name "MyUserEntry"
PS C:\> $filePath = "C:\Users\admin\Desktop\note.txt"
PS C:\> $link = Send-RDMMessageByShareableLink -Body 'A special message' -Connection ($document, $userVaultEntry) -FilePath $filePath
PS C:\> $link
```

Store the created shareable link to the message 'A special message' in the variable $link. The link will contain a document, a user vault entry, and a file selected from a path.

#### Example 1

```powershell
PS C:\> $link = Send-RDMMessageByShareableLink -Body 'A special message' -Passphrase 654321 -Duration 5 -AllowRecipientToDeleteMessage -ViewLimit 10
PS C:\> $link
```

Store the created shareable link to the encrypted message 'A special message' in the variable $link. The link will be valid for 5 days or 10 views. To decrypt the message, the recipient will have to use the passphrase.

#### Example 2

```powershell
PS C:\> $attachment = Get-RDMEntry -name "EntryWithAttachment" | Get-RDMEntryAttachment -Title "My attachment"
PS C:\> $link = Send-RDMMessageByShareableLink -Body 'A special message' -Attachment $attachment
PS C:\> $link
```

Store the created shareable link to the message 'A special message' in the variable $link. The link will contain a selected entry's attachment as a downloadable file.

#### Example 3

```powershell
PS C:\> $document = Get-RDMEntry -name "MyDocument"
PS C:\> $userVaultEntry = Get-RDMPrivateSession -Name "MyUserEntry"
PS C:\> $filePath = "C:\Users\admin\Desktop\note.txt"
PS C:\> $link = Send-RDMMessageByShareableLink -Body 'A special message' -Connection ($document, $userVaultEntry) -FilePath $filePath
PS C:\> $link
```

Store the created shareable link to the message 'A special message' in the variable $link. The link will contain a document, a user vault entry, and a file selected from a path.

### Parameters

#### -AllowRecipientToDeleteMessage

Allow a recipient to delete the message

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

#### -Attachment

Attachments to add to message.

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

#### -Body

Message to be sent.

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

#### -Connection

Connections to add to message. These should be either documents, X509 credentials, or user vault entries.

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

#### -Duration

Time before the expiration of the link. Either a number of days (max 30) or a value from the enum \[Devolutions.Server.ApiWrapper.Models.SendLinkDuration]. The default duration is a single hour.

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

#### -FilePath

File paths of files to add to message.

```yaml
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  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:
- Cancel
- No
- Yes
HelpMessage: ''
```

#### -Passphrase

Passphrase to protect message. The recipient will have to use it to decrypt the message.

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

#### -ViewLimit

How many times the link can be seen before being deleted. By default, there is no limit. Accepted range: 0 to MaxValue.

```yaml
Type: System.Nullable`1[System.Int32]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 3
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  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).

### Errors and warnings

Messages this cmdlet can return (Devolutions.PowerShell 2026.3.4):

| Type  | Message                                                                                                                                    |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Error | Maximum duration of {0}                                                                                                                    |
| Error | The passphrase is mandatory in this workspace when using Devolutions Send.                                                                 |
| Error | Files exceed the maximum allowed size                                                                                                      |
| Error | Error ID FileNotDeleted. The message text is built when the error occurs (from the underlying exception or server response), so it varies. |
| Error | Unknown error                                                                                                                              |
| Error | Devolutions Send feature is disabled                                                                                                       |

### Notes

For more information, type "Get-Help Send-RDMMessageByShareableLink -detailed". For technical information, type "Get-Help Send-RDMMessageByShareableLink -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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell/powershell-commands/send-rdmmessagebyshareablelink.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
