< Back

Send-RDUserMessage

Thu Apr 04, 2019 5:42 am

NAME Send-RDUserMessage



SYNOPSIS

Sends a system message to a specified user session.





SYNTAX

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





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.



Required? true

Position? 1

Default value none

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-MessageBody <String>

Specifies the text for the message body.



Required? true

Position? 4

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-MessageTitle <String>

Specifies the text for the message title.



Required? true

Position? 3

Default value none

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.



Required? true

Position? 2

Default value none

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS

System.Object







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



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"



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







RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=294252

Disconnect-RDUser

Get-RDUserSession

Invoke-RDUserLogoff