Hardware and software setup

Send a message over the network. Net send text message command

Note

If the firewall is not disabled, then the program Nassi should be included in its exceptions.

send command text messages net send

You can send text messages over the local network not only to special programs(Radmin, Nassi) but also from the command line Windows xp. Team net send used to send text messages to another computer available on the network. However, in order to team worked, you must first enable the message delivery service. To do this, go to Control Panel. Open folder Administration, Services. Find the messaging service in the list (Fig. 20.9).

Rice. 20.9.

Open its properties. Select meaning Auto from the list launch type, if you want the service to automatically start on boot Windows. Then click on the button Start and OK(fig. 20.10 and fig. 20.11).

Rice. 20.10.

Rice. 20.11.

Let's look at some examples of how to use the command net send when sending messages to working group(domain) 110. To send a message to all users in workgroup 110, type: net send /domain:110 PING. Another variation of a similar command: to send a message to all users in your domain, type: net send * ping(fig. 20.12 and 13)



Rice. 20.12.

Rice. 20.13.

To send a message to a specific user, such as 110-1, type: net send 110-1 HELLO!(Fig. 20.14).

Rice. 20.14.

V Windows XP has another option for sending messages over the network. Execute commands Control Panel-Administrative Tools-Computer Management. Farther: Action-All Tasks-Send Console Message. Next, select a PC and send a text to it (Fig. 20.15).


Check if the system supports the msg command. The functionality of this command is very similar to that of the unused net send command. But this command only works in professional and enterprise versions of Windows. If you are working in Windows Home, upgrade your system to Professional or Enterprise version to be able to use msg command.

  • For Windows version, click ⊞Win+Pause or click right click click on "Computer" and select "Properties". The Windows version will appear under Windows Edition.

Open command line. Like net send , the msg command is run from the command line. Command line starts different ways(depending on the version of Windows), or simply click ⊞ Win and type 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 a command. Type msg and press Space. Next, you need to enter information that contains the text and direction of the message.

  • Specify 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 a specific session.
    • msg session ID - Enter the ID of a specific session.
    • 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 who are connected to the server.
  • Specify the server whose users you want to send the message to (if you want). 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 want). You can set a time limit to specify the interval to wait for confirmation from the recipient. The temporary modifier is entered after the server information (if any).

    • msg * /time: seconds (e.g. 300 seconds for a five minute interval)
  • Enter your message text. After entering the various options, enter the message text. Or click ↵Enter, and the system prompts you to enter the text of the message on a separate line.

    • For example: msg @salesteam /server:EASTBRANCH /time:600 Congratulations on the increase in 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 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 Windows version does not support msg . Upgrade Windows to Professional edition.
    • Error 5 getting session names or Error 1825 getting session names. An error occurred while communicating with the recipient. You can try to fix this problem by opening the registry editor on the recipient's computer (to do this, run the regedit command), go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server and change the value of the "AllowRemoteRPC" parameter from 0 to 1.
  • faced with the problem of informing users, the most common cause- 1C update, in which it is necessary that all my users (and there are more than 160 of them) exit 1C and do not log in for some time. It would seem that something complicated, you can send a message by e-mail, as I used to do when I had office 365, but Yandex mail has its own limitations: no more than 50 users on the mailing list. If send more users, the letter will simply not reach some. Sending 50 users individually is not convenient. The second problem with Yandex mail is the need to enter captcha in some cases, the system perceives the mass mailing as spam, and the letters are necessary, if you do not warn the user, he will not be saved on time and there may be problems ...

    In general, it has become terribly inconvenient to send messages to all users. I started thinking about solutions.

    The first thing that came to mind: but a few inconveniences emerged:

    • Messages arrive in about 30 minutes for 160 jobs, which is a very long time.
    • The message appears only on the taskbar, if the user works via remote desktop, he will not see the message immediately.
    • It is necessary to maintain the operability of Kaspersky agents on the user's working machines, otherwise the message will not reach at all.

    The second option is to install some messenger, but here there are also several inconveniences.

    • There are a lot of messengers, they are not universal, you cannot send messages to each other between messengers.
    • Good messengers are paid.
    • Messages do not pop up on top of all windows, and if you need to report something urgent and important, then this is a useful feature of the message.
    • Installation and configuration of these same messengers is required, as well as user training for new software.

    In the end I'm on command Windows line, there are net send and msg commands to send messages to all computers on the local network. Everything works very simply, you open the command line, write a command, a message comes to the computer whose name you specified in the command text. Moreover, the message pops up on top of all windows, registration is not required, and everything is completely free.

    The command for sending messages to one computer on the local network looks like this:

    msg * /server:computername "Test message, click OK"

    I made a list of computers, then a little tedious work on creating the same type of commands in one txt file, but done quickly via copy-paste. The main thing is to make a list of computers. In a domain, this is done quite simply through the "Users and Computers" snap-in, right-click under the list of computers, then "Export List" immediately to a TXT file. Since I have about 160 computers in the domain, I approached the issue a little more creatively, did not do “copy-paste”, but did an auto-replacement of the first letter in the computer name in the already existing list of computers with msg * /server: + the first letter in the name of computers, for my luck it was the same for everyone. Similarly for the second part, but only with the last letter of the computer name (the last letter in the computer name + "Test message, click OK"), as a result I received a TXT file with a list of commands. I changed the file extension from txt to bat and launched it for execution. As a result, all computers in the domain received a "test message, click OK."

    Unfortunately, such a command does not work outside the domain, and since I completed the task, it was simply not rational to experiment further. I failed to send messages to computers in the workgroup, but I have only a few such computers. They can also send a message by mail, or in the same Kaspersky, or through some messenger. Let this be the topic for one of the following entries.

    As a result, what I got: 1 file in which you can quickly change the text of the message and with which I can send any message for free to everyone in the domain. It looks great, but there are still a couple of minuses:

    1. It is necessary to keep the file up to date, add new ones, delete non-existent computers.
    2. No immediate feedback.
    3. The file turned out to be ugly, I think it is possible to load the values ​​​​of the computer name from the file into this command, but there was no time to figure it out to the end.

    However, the pros outweigh all the cons:

    • Quick to implement, requires little to no preparation for the next shipment.
    • Reliably works, the user will definitely see this message.
    • Is free.
    • Very, very simple, you just need to know one command and computer names.

    I will be glad to any comments, suggestions, comments)

    Team MSG existed in Windows 2000/XP and was intended for messaging between users logged in locally and users of terminal sessions (connected to a remote desktop). On Windows Vista and later operating systems of the family windows command MSG became the main standard means messaging because the command net send is no longer supported in these OSes.

    Command line format:

    MSG (user | session name | session id | @file name | *) [message]

    Description of command line options:

    user- Username.
    session name- Session name.
    session ID- Session ID.
    @File name- A file containing a list of usernames, sessions, or session IDs to which the message is sent.
    * - Send a message to all sessions on the specified server.
    /SERVER:server- Server (by default - current).
    /TIME:seconds- The interval for waiting for confirmation from the recipient.
    /V- Display information about the performed actions.
    /W- Waiting for a response from the user, useful with /V.
    message- The message to be sent. If not specified, a prompt is issued or input is taken from STDIN.

    Important!

    The current implementation of msg.exe is fine for exchanging messages between local and terminal user sessions within the same system, however, in cases of exchange between different computers local network, you will need to change some of the default security settings in Windows Vista, 7 and later operating systems.

    At default settings, send message to users remote computers fails and is accompanied by the message:

    Error 1722 when getting session names

    This means that it is not possible to obtain information about logged-in users on the computer where the message being sent is to be received. The reason may be that the firewall is blocking incoming connections, insufficient user rights in relation to the remote system, prohibiting remote procedure calls in the Terminal Server service settings. At a minimum, for messaging using the command msg between computers, you must have a user account that is valid with respect to the remote system and execute following settings:

  • on each computer to which messages will be sent, add to the registry key HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server parameter AllowRemoteRPC type REG_DWORD and equal 1 To change the settings, you can use the .reg file with the following content:

    Windows Registry Editor Version 5.00
    "AllowRemoteRPC"=dword:00000001

    In Windows Vista, Windows 7, 8, 10 registry key AllowRemoteRPC exists, but has a value equal to 0 which needs to be corrected. A reboot is required to apply the changes.

  • since the messaging utility msg.exe uses SMB protocol(Server Message Block), on each computer to which messages will be sent, a TCP port must be open 445

    Examples of using MSG:

    msg * /server:Server "Test message"- send a test message to all computer users server

    msg * /server:192.168.0.1 "Test message"- send a test message to all users of a computer with an IP address 192.168.0.1

    msg RDP-Tcp#0 /server:TSServer "Test message"- send a test message to the user terminal session named RDP-Tcp#0 on the computer TSServer

    msg console /server:Windows7 "Test message"- send a test message to the current local user computer Windows7

    msg console "Test message"- send test message from RDP session user to local user. If this command is executed by a non-terminal session user, the message will be sent by the local user to itself.

    To execute a command msg on behalf of another user, you can use the utility PSExec from the package PSTools or standard tool runas.exe

    psexec -u otheruser -p otherpass msg * /server:win10 TEST message

    runas /user:otheruser "msg * /server:win10 Test message"

    Messages sent by the team msg local user of the operating system computer Windows system XP that is missing (not yet logged into Windows) is displayed in a window with an invitation to register in the system and can be accessed by outsiders.

  • Liked the article? Share with friends!
    Was this article helpful?
    Yes
    Not
    Thanks for your feedback!
    Something went wrong and your vote was not counted.
    Thank you. Your message has been sent
    Did you find an error in the text?
    Select it, click Ctrl+Enter and we'll fix it!