Sending a message domain network msg. MSG command – send a message to the user. Notes on using the net send command

In older operating systems of the family Windows Server, up to Windows Server 2008 R2, it is possible to send messages to all active server users through the Task Manager. This can be very useful if you need to notify them about some event, such as a server shutdown or some technical work.

This is done quite simply - first of all you need to open the Task Manager (the easiest way is to right-click on the taskbar and select " Task Manager").

In the Task Manager, go to the "Users" tab.

And there we select all users - either with the mouse, or by selecting the topmost user, hold down the Shift button, and then the End button.

Right-click on the selected users and select " send a message".

In the window that appears, type the desired message. In line " Heading" you should enter the text that will be displayed in the window title, and in the field " Message"The message itself.

And then press the button " OK". After this, all users will see the message you sent.

Via command line

All the same can be done through the Command Line; to do this, run the MSG command in it:

Msg * Attention! Within the next five minutes, the server that supports your work will reboot. We apologize for the inconvenience caused.

Check if your system supports the msg command. The functionality of this command is much the same as the unused net send command. But this command only works in professional and enterprise versions of Windows. If you're using Windows Home, upgrade to Professional or Enterprise to be able to use the msg command.

  • To find out your Windows version, click ⊞ Win + Pause or right-click Computer and select Properties. The Windows version will appear under Windows Edition.

Open a command prompt. Like net send, the msg command is run from the command line. Command Prompt is launched in different ways (depending on the version of Windows), or simply press ⊞Win and enter cmd.

  • Windows Vista/7: Open Command Prompt from the Start menu.
  • Windows 8.1/10: Right-click the Start button and select Command Prompt.
  • Windows 8: Click ⊞ Win + X and select Command Prompt.
  • Enter the command. Type msg and press Space. Next, you need to enter information that contains the text and direction of the message.

  • Identify the recipient of the message. Compared to net send, the msg command has additional options.

    • msg username – enter the name of a specific user.
    • msg session – Enter the name of the specific session.
    • msg Session ID – Enter the specific session ID.
    • msg@filename - Enter the name of a file that contains a list of usernames, sessions, and/or session IDs. Useful for sending messages to department employees.
    • msg * – the message will be sent to all users connected to the server.
  • Specify the server whose users you want to send the message to (if you wish). If you want to send a message to a user who is connected to another server, enter the server information after the recipient information. If no server is specified, the message will be sent to the current server.

    • msg * /server: server name
  • Set a time limit (if you wish). You can set a time limit to specify how long to wait for confirmation from the recipient. The time modifier is entered after the server information (if any).

    • msg * /time: seconds (for example, 300 seconds for a five-minute interval)
  • Enter your message text. After entering the various parameters, enter your message text. Or click ↵Enter, and the system will prompt you to enter the text of the message in a separate line.

    • For example: msg @salesteam /server:EASTBRANCH /time:600 Congratulations on increasing your sales this quarter!
  • Send a message. To do this, click ↵Enter. The recipient will receive it immediately.

    • The msg command is designed to send messages to terminal users, not just to different computers connected to the same network.
  • Troubleshoot. When working with msg you may encounter the following errors:

    • "msg" is not recognized as an internal or external command, operable program or batch file. (msg is not recognized as an internal or external command, executable program, or batch file). In this case, the Windows version does not support msg . Upgrade Windows to Professional version.
    • Error 5 getting session names or Error 1825 getting session names. Error when communicating with the recipient. You can try to resolve this problem by opening the registry editor on the recipient computer (to do this, run the regedit command), going to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server and changing the AllowRemoteRPC setting from 0 to 1.
  • To those network computers from which messages need to be sent.

    Understanding the net send command

    Net send is a console application included with some versions of Windows that is designed to send messages over a local network to another user, computer, or alias. The command is only available on Windows NT, 2000, XP, 2003 and is not available on Windows 7, Vista, ME, 98, 95 and older. In Windows XP, starting with Service Pack 2, the net send command is disabled by default.

    Using the net send command

    For net send to work, the Windows Messaging service must be running. In fact, the net send command is just a command line interface to the messaging service, which directly deals with sending and receiving messages. To be able to receive messages, the computer to which the message is sent must also be running Messenger Service or another program that uses the same messaging protocol. The message can only be sent to an active entity on the network. If a message is sent to a user, they must be logged in using their username.

    To send messages using the net send command, launch a command interpreter (command line). To start the command interpreter, select Run from the Start menu, type cmd, and click OK. Use the net command with the send parameter and other parameters in accordance with the command syntax. The messaging service displays received messages in a standard Windows message dialog box.

    net send command syntax

    The net send command has the following syntax:

    net send (username | * | /domain[:domainname] | /users) message

    username- user name, computer name or nickname to whom you want to send a message;

    * - sending messages to all members of a domain or workgroup;

    /domain[:domainname]- sending a message to all names in the computer domain or in the domainname domain;

    /users- sending a message to all users connected to the server;

    message- Message text.

    Notes on using the net send command

    If command parameter arguments contain spaces, they must be enclosed in quotation marks.

    It may be difficult to use long message recipient names. Names used by the messaging service are up to 15 characters long.

    The maximum length of broadcast messages is 128 characters. The maximum length of personal messages is 1600 characters.

    Examples of using the net send command

    To send the message “You can send a message over a local network using the net send command” to the user ivanov, enter:

    net send ivanov You can send a message over a local network using the net send command

    To send a message to everyone connected to the computer from which the message is being sent, type:

    net send /users Everyone immediately exit 1C!

    To send a message to all users in the ukmz domain, enter:

    net send /domain:ukmz Electricity in the building will be turned off in 5 minutes

    To send a message to all users in the domain of the computer from which the message is sent, type:

    net send * Gentlemen, the meeting with the general director will take place at 13:00

    Enabling or disabling messaging and net send

    Enabling and disabling the messaging service is possible using both the MMC console (Services snap-in) and using the command line. To perform these operations, you must have administrator rights.

    To enable the messaging service using the MMC console, follow these steps: Go to Control Panel. Open the Administration, Services folder. Find "Messenger" in the list. Open the service properties window. Select "Auto" from the "Startup Type" list if you want the service to automatically start when Windows boots. Then click the Start button. Click OK.

    To disable the messaging service, follow these steps: Go to the Control Panel. Open the Administration, Services folder. Find "Messenger" in the list. Open the service properties window. Select Manual from the Startup Type list. Then click the Stop button. Click OK.

    To enable messaging from the command line, enter the following commands in a shell:

    sc config messenger start=auto
    net start messenger

    To disable the messaging service from the command line, enter the following commands in a shell:

    net stop messenger
    sc config messenger start= disabled

    How to send net send messages in Windows 7

    To send net send messages in those versions of Windows where this command is not available (Windows 7, Vista, ME, 95, 98), you can use third-party software. We suggest you use two programs: WinSent Messenger and the Sent utility. WinSent Messenger is a messenger for local networks, compatible with net send. The Sent utility is designed to send messages from the command line. More detailed information is available on the pages of these software products:

    Info
    My Windows-Server 2008 R2 machine couldn’t msg my Windows 7 box due to Error 5 getting session names.
    I found the solution, in a comment made by Consoles. I reblog it so it can be found easier.

    It turns out it has nothing to do with not being on the same domain or whatever. It is due to a setting related to Terminal Server.
    That’s not to miraculous, since msg.exe is designed for messaging to terminal users.

    So, changing a simple registry value and rebooting makes it all work again.

    Solution
    On the machine that you cannot message to:
    Use regedit to navigate to:
    Then change the following value:

    Name: AllowRemoteRPC
    Type: REG_DWORD
    Value: 1

    Reboot. Now it should work. 🙂

      I did this on all my Windows 7 HP machines and it got rid of the error 5 but now it says does not exist or is disconnected. Any solution yet. I have been google-ing for about 3 hours on this and haven’t found anything other than 3rd party installs which is impractical in my situation.

      Hi All after much trying and re trying i got it right to send windows 7 to windows 7

      using the following command

      msg /server:pcname username message

      server stays as is. pcname is the name of the pc you are sending to. user name is the name the user is logged in under on that PC. message is obviously the msg u want to send.

      you will also need to change a setting on the receiving computer by using regedit.

      the following registry key must be activated (as described by Consoles above):

      HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

      Name: AllowRemoteRPC

      Value: 1 (the dafault is ‘0’)

      Isn’t allowing remote RPC like, a *HUGE* security risk?

      I'd like to enable this so me and my roommate downstairs can have a ridiculously simple way to communicate, but if it means allowing his computer to make RPC calls, I'm afraid if he has a virus my computer will catch it, or if for some reason RPC requests are able to pass through my router, anyone over the internet will have an easy attack vector to my machine.

      I think there’s a reason it’s disabled in Vista/7 by default. I’m not sure if the winpopup is worth compromising your security.

      superray: search in regedit (F3) for ‘allowremoterpc’ it will find it

      anon: yes, but only in intranet, and only if your firewall does not stop it. the rooter firewall will prevent all attempts by default. (it could be a problem only in mass lan-s like barding school. If scared, use skype or msn (meeboo.com)

      You can send messages among Windows 7 machines and Windows XP machines on a LAN using freeware. It took a lot of searching, but I found an app that works from a command prompt and in batch files to send messages.

      I had hoped to use msg.exe on our LAN, but after trying all the recommended Registry tweaks, firewall changes, etc., I could only send messages to Windows 7 machines. The above freeware apps worked right away sending to Windows XP machines and to Windows 7 machines. They work on both Workgroup LANs and on domains.

      WinSend is a more traditional Instant Messaging application that starts at about $12 and goes down in price based on quantity of licenses purchased.

      I know this is old, but maybe someone has a solution.

      My computer: PC
      Target: LAPTOP (192.168.0.110)

      msg /server:laptop * “Hello Laptop”
      Returns * does not exist or is disconnected.

      Trying with IP
      msg /server:192.168.0.110 * “Hello Lappy”
      Returns ‘Error 5 getting session names’

      I have already applied the registry change and rebooted the machine multiple times.

      Any other suggestions?

      you need to do what SUHAIL said…
      and the computer wich you are triying to connect need a password, and user… added in windows credentials,
      search in windows credential manager… and add the user and password…

      Hi i tried to go to regedit and follow the steps but it doesn’t have a folder called HKML instead it has HKEY_CLASSES_ROOT and HKEY_CURRENT_USER etc. can i get the path for the folders i have?

      modify regedit file

      HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

      Name: AllowRemoteRPC

      Value: 1 (the dafault is ‘0’)

      msg / SERVER: Destination User “send message”
      regards

      _______________________________________

      modificar archivo regedit

      HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

      Name: AllowRemoteRPC

      Value: 1 (the dafault is ‘0’)

      envio de mensaje

      msg /SERVER:Destino Usuario “mensaje a enviar”

    Did you like the article? Share with friends: