Microsoft msg command line command

Updated: 09/15/2017 by Computer Hope

About msg

The msg command allows you to send messages to other users on a network.

Availability

The msg command is an external command and is available in the following Microsoft operating systems.

Windows 10

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.
* Send message to all sessions on 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 Message to send. If none specified, prompts for it or reads from stdin.

Msg examples

msg hope There is Hope!

Send a message to the user "Hope" with the message "There is Hope!"

Tip: You can send messages to your username. For example, you could use the msg command in a batch file to send you a message when something is triggered or when the batch file is complete.

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.

Additional information

  • See the net send command for information on using the net command to send messages to other computers in earlier versions of Windows.