You can use a utility called smbclient (part of samba server) to send a message to windows system from FreeBSD or from Linux/Solaris/UNIX OS. This command lets you send messages to windows workstations, display browse lists, and connect to SMB shares. The syntax is as follows to send message:
smbclient -M <WINDOW-SYSTEM-NAME> <<EOF
When the message is complete, press Control-D.
smbclient is a client that can ‘talk’ to an SMB/CIFS server. It offers an interface similar to that of the ftp program, Operations include things like getting files from the server to the local machine, putting files from the local machine to the server, retrieving directory information from the server and so on.
Sending message to Windows system from Linux/ FreeBSD
To send a message “Meeting canceled” to windows system called joyxp, type:
$ smbclient -M joyxp <<EOF
Meeting canceled See you at coffee house in 2 hrs. --nixCraft Sys Admin EOF
Pass the –U option to specify the username:
$ smbclient -M myxp -U Your-User-Name-Here <<EOF
See you at coffee house in 2 hrs.
This tip also works with Linux and other UNIX variant with Samba client utilities package. Read man page of smbclient for more information: