Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Net send to multiple computers

carlo_3
Occasional Visitor

Net send to multiple computers

is it possible to send a net send message to say 2 computers, instead of sending to commands?
3 REPLIES
Volker Borowski
Honored Contributor

Re: Net send to multiple computers

Only thing I remember is

net send * "bla bla"

sending to the entire workgroup / domain !

Do not know if this helps.
Volker
Volker Borowski
Honored Contributor

Re: Net send to multiple computers

ya, that was not so good :-)

How about this script ?
=================================

@echo off
set message=%1
:loop
if %2"nix" == "nix" goto :byebye
echo net send %2 %message%
shift
goto loop
:byebye

=================================
Sample output:

C:\users\default>script.cmd "test eins" a b c d
net send a "test eins"
net send b "test eins"
net send c "test eins"
net send d "test eins"

C:\users\default>

Volker
Wodisch
Honored Contributor

Re: Net send to multiple computers

Hello,

a one-liner:


for %%u in (pc1 pc2 pc3) do net send \\%%u "bla bla"

HTH,
Wodisch