How to Use the msg Command to Send Messages to Users in Windows 11

The Problem with Email Warnings

If you are a systems administrator managing a massive corporate network, there will inevitably be a moment when you need to take a critical server offline for emergency maintenance. If fifty different employees are currently logged into that specific server via Remote Desktop, you must warn them to save their work before you pull the plug.

Sending a mass corporate email is completely ineffective. Half the employees will not check their inbox in time, and the other half will ignore the email entirely. You need a way to mathematically force a highly intrusive, unignorable pop-up warning to physically appear on the center of their screens, instantly pausing their work until they acknowledge the message.

To bypass email and broadcast critical alerts directly into the graphical interface of every single user connected to a Windows machine, you must use the msg (Message) command.

Step 1: Open the Command Prompt

Because you are injecting a pop-up window directly into another user’s private session, you must have administrative authority over the machine you are sending the message from.

  1. Press the Windows Key, type cmd.
  2. Right-click on Command Prompt and select Run as administrator.

Step 2: Sending a Direct Message

The msg command requires you to define exactly who is receiving the message. If you want to target one specific employee (e.g., username: jdoe), you simply type their username, followed by the actual message.

msg jdoe "Please log off the accounting server immediately. Rebooting in 5 minutes."

The terminal will execute the command silently. On John Doe’s monitor, regardless of what application he is currently using, a gray Windows dialog box will violently pop up in the center of the screen containing your exact text. He must physically click “OK” to dismiss it.

Step 3: The Nuclear Option (Broadcasting to Everyone)

If you do not have time to look up the specific usernames of the fifty people currently connected to the server, you can use the wildcard asterisk (*). This tells the operating system to target every single active session mathematically.

msg * "EMERGENCY: The server is shutting down in 60 seconds. Save your work NOW."

This is the nuclear option. Every single monitor connected to that machine will instantly display the warning, guaranteeing total compliance.

Step 4: Adding a Countdown Timer

If you send a warning but an employee has walked away from their desk to get coffee, the pop-up box will sit on their screen forever. This can cause problems if your automated reboot script is waiting for all users to acknowledge the warning before executing.

You can use the /time: flag to force the pop-up box to mathematically self-destruct after a specific number of seconds.

msg * /time:30 "Server rebooting in 30 seconds."

The warning will appear on everyone’s screen. If an employee is at their desk, they can click “OK” to dismiss it. If they are away, the pop-up will automatically vanish after exactly 30 seconds, allowing your automated reboot script to continue without getting permanently stuck on an unacknowledged prompt. By mastering the msg command, you guarantee that your critical administrative warnings are never ignored.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.