Msg


Applies To: Windows Vista,Windows Server 2008

Sends a message to a user on a terminal server.

For examples of how to use this command, see Examples.

Syntax


Copy Code

msg {<UserName> | <SessionName> | <SessionID>| @<FileName> | *} [/server:<ServerName>] [/time:<Seconds>] [/v] [/w] [<Message>]

Parameters

Parameter

Description

<UserName>

Specifies the name of the user that you want to receive the message.

<SessionName>

Specifies the name of the session that you want to receive the message.

<SessionID>

Specifies the numeric ID of the session whose user you want to receive a message.

@<FileName>

Identifies a file containing a list of user names, session names, and session IDs that you want to receive the message.

*

Sends the message to all user names on the system.

/server:<ServerName>

Specifies the terminal server whose session or user you want to receive the message. If unspecified, /server uses the server to which you are currently logged on.

/time:<Seconds>

Specifies the amount of time that the message you sent is displayed on the user's screen. After the time limit is reached, the message disappears. If no time limit is set, the message remains on the user's screen until the user sees the message and clicks OK.

/v

Displays information about the actions being performed.

/w

Waits for an acknowledgement from the user that the message has been received. Use this parameter with /time:<Seconds> to avoid a possible long delay if the user does not immediately respond. Using this parameter with /v is also helpful.

<Message>

Specifies the text of the message that you want to send. If no message is specified, you will be prompted to enter a message. To send a message that is contained in a file, type the less than (<) symbol followed by the file name.

/?

Displays help at the command prompt.

Remarks

Examples


Copy Code

msg User1 Let's meet at 1PM today


Copy Code

msg modem02 Let's meet at 1PM today


Copy Code

msg 12 Let's meet at 1PM today


Copy Code

msg @userlist Let's meet at 1PM today


Copy Code

msg * Let's meet at 1PM today


Copy Code

msg * /TIME:10 Let's meet at 1PM today

Additional references

Command-Line Syntax Key

Terminal Services Command Reference