Net Send type command

Started by jkjk12, September 02, 2014, 08:25:50 AM

Previous topic - Next topic

jkjk12

Net Send is not part of Windows 7.  They have the MSG command but it is to send messages to users and not really used for computer to computer communication.  Does WinBatch have a way to to mimic Net Send so you can send a broadcast message to all Windows 7 workstations on your network? 

td

You could get  a list of computers on a domain or workgroup and then execute msg.exe once for each computer.

Here is an VBS example that could possibly be simplified and converted to WinBatch:

http://gallery.technet.microsoft.com/scriptcenter/A-net-messenger-script-for-810f8331

The following article in the Tech. DB discusses problems using the wtsSendMessage function on Windows 7:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WIL~Extenders/Terminal~Server+wtsSendMessage~and~Win7.txt
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

jkjk12

thanks for the link.   We are doing away with all VBScripts in our environment and trying to use only PowerShell.    I've yet to find a matching script using PowerShell.  But what I just can't believe is why would Microsoft remove such a useful command as Net Send?   I've discovered the MSG command but so far it does not work, or it only works when I send myself a message or my own PC.  I've yet to get it working when I target a remote PC. 

td

I would suspect that MSFT removed the 'Net Send' business for security reasons or at least that is what they would claim.  IIRC, you need to allow remote RPC to get the msg business to work and that is usually disabled.  IIRC and as describe in the Tech DB article, you need to set the key value

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server[AllowRemoteRPC]

to 1 on any and all machines that you want to send messages to or from. 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

Neglected to mention that you don't need to use VBS to use the VB example. It can be translated directly into a WinBatch script.  That said, it obviously wont help any, if remote RPC is disabled.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade