Msg command
Updated: 11/12/2023 by Computer Hope
The msg command lets you send messages to other users on a network.
Availability
Msg is an external command and is available for the following Microsoft operating systems.
Note
The msg command is only available in Pro or Business editions of the following Windows versions.
Msg syntax
Microsoft Windows 10 syntax
MSG {username | sessionname | sessionid | @filename | *} [/SERVER:servername] [/TIME:seconds] [/V] [/W] [message]
username | Identifies the specified username. |
sessionname | The name of the session. |
sessionid | The ID of the session. |
@filename | Identifies a file containing a list of usernames,sessionnames, and sessionids to send the message. |
* | Sends a message to all sessions on a specified server. |
/SERVER:servername | Server to contact (default is current). |
/TIME:seconds | Time delay to wait for the receiver to acknowledge msg. |
/V | Display information about actions being performed. |
/W | Wait for a response from the user, useful with /V. |
message | Dictates the message you'd like to send. If none specified, prompts for it or reads from stdin. |
Msg examples
msg hope Hi Computer Hope!
Send a message to the user "hope" with the message "Hi Computer Hope!"
Tip
The msg command lets you send messages to your username. For example, you could use the msg command in a batch file to send yourself a message when something is triggered or when the batch file is completed.
msg hope /V /W Can you see this?
Sends a message to the user "hope" saying, "Can you see this?" and waits until the user clicks the OK button (a response) and then returns to the command line.