Networking
1745791 Members
3917 Online
108722 Solutions
New Discussion юеВ

Re: Net send to multiple computers

 
carlo_3
New Member

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 3
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