Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Send-RDUserMessage

Send-RDUserMessage

remotedesktop.psm1

Synopsis

Sends a system message to a specified user session.

Syntax

Send-RDUserMessage [-HostServer] [-UnifiedSessionID] [-MessageTitle] [-MessageBody] [<CommonParameters>]

Detailed Description

The Send-RDUserMessage cmdlet sends a system message to a specified user session. Because the user session ID is unique only within the context of a session host, a different session host server can share the same user session ID. The host server and session ID that you specify by using this cmdlet uniquely identify a session within a deployment.

Parameters

-HostServer <String>

Specifies the name of the server that hosts the session. For session collections the host server has the name of the Remote Desktop Session Host (RDĀ  Session Host) server. For virtual desktop collections the host server has the name of the Remote Desktop Virtualization Host (RDĀ Virtualization Host) server.

Aliases

None

Required?

true

Position

1

Default value

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-MessageBody <String>

Specifies the text for the message body.

Aliases

None

Required?

true

Position

4

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-MessageTitle <String>

Specifies the text for the message title.

Aliases

None

Required?

true

Position

3

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-UnifiedSessionID <Int32>

Specifies a unique session ID on the host. Use Get-RDUserSession to retrieve the unique ID for a specific session.

Aliases

None

Required?

true

Position

2

Default value

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type

System.Object

Notes

None

Examples

Example 1: Send a system message to users of a Remote Desktop application

This command sends a system message to users of the session with an ID of 1 on the host server named rdsh.contoso.com.

PS C:\> Send-RDUserMessage -HostServer "rdsh.contoso.com" -UnifiedSessionID 1 -MessageTitle "Message from Administrator" -MessageBody "Please save your work. You will be logged off in 10 minutes"

Online Version
Disconnect-RDUser
Get-RDUserSession
Invoke-RDUserLogoff