Send-RDUserMessage

適用対象: Windows 10, Windows Server Technical Preview

Send-RDUserMessage

Sends a system message to a specified user session.

構文

Parameter Set: Default
Send-RDUserMessage [-HostServer] <String> [-UnifiedSessionID] <Int32> [-MessageTitle] <String> [-MessageBody] <String> [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [ <CommonParameters>]

詳細説明

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.

パラメーター

-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

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-InformationAction<System.Management.Automation.ActionPreference>

Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:

-- SilentlyContinue
-- Stop
-- Continue
-- Inquire
-- Ignore
-- Suspend

Aliases

infa

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-InformationVariable<System.String>

Specifies a variable in which to store an information event message.

Aliases

iv

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-MessageBody<String>

Specifies the text for the message body.

Aliases

none

必須/オプション

true

位置

4

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-MessageTitle<String>

Specifies the text for the message title.

Aliases

none

必須/オプション

true

位置

3

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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

必須/オプション

true

位置

2

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • System.Object

使用例

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"

関連項目

Disconnect-RDUser

Get-RDUserSession

Invoke-RDUserLogoff