How can we send messages using CMD from one computer to another?

From a CMD.EXE prompt you can use the MSG command.

This replaces an older mechanism using NET SEND …

I just did this on a Windows 10 Pro system:

  1. C:Usersstevalyn>msg 
  2. Send a message to a user. 
  3.  
  4. MSG {username | sessionname | sessionid | @filename | *} 
  5. [/SERVER:servername] [/TIME:seconds] [/V] [/W] [message] 
  6.  
  7. username Identifies the specified username. 
  8. sessionname The name of the session. 
  9. sessionid The ID of the session. 
  10. @filename Identifies a file containing a list of usernames, 
  11. sessionnames, and sessionids to send the message to. 
  12. * Send message to all sessions on specified server. 
  13. /SERVER:servername server to contact (default is current). 
  14. /TIME:seconds Time delay to wait for receiver to acknowledge msg. 
  15. /V Display information about actions being performed. 
  16. /W Wait for response from user, useful with /V. 
  17. message Message to send. If none specified, prompts for it 
  18. or reads from stdin. 
  19.  
  20.  
  21. C:Usersstevalyn> 

main-qimg-27d613b6ec36c3618a546da2accb1d3b