By useing net send command u can send massage
How to use netsend.exe
netsend.exe /server /text of message
/server - target computer name
/text of message - text to send
Example : To send a message to computer name webmaster with text: "Hi! How are you?"
Command line reads: netsend.exe /webmaster /hi! how are you?