Net Send to an OU

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to limit sending a message just to a specific computer OU? I've got about 400 computers in the OU and would like to periodically send them a message. I've tried using ldifde and exporting the information and then using a VB script, but would like to know of an easier way. Thanks in advance

Christian
 
No, OU's are not security principals so you can't net send to one.

Christian said:
Is there a way to limit sending a message just to a specific computer OU?
I've got about 400 computers in the OU and would like to periodically send
them a message. I've tried using ldifde and exporting the information and
then using a VB script, but would like to know of an easier way. Thanks in
advance!
 
Is there a way to limit sending a message just to a specific computer OU? I've got about 400 computers in the OU and would like to periodically send them a message. I've tried using ldifde and exporting the information and then using a VB script, but would like to know of an easier way. Thanks in advance!

Christian

Yes.

If you have a WinXP workstation or a Windows Server 2003 member or DC, and your
domain is at least Windows 2000 SP3.

Will post the following as tip 8026 later this afternoon:

8026 » How can I 'net send' to all users in an Organizational Unit (OU)?


Using the DSQUERY command, I have scripted NetSendOU.bat to net send a message
to all users in a given OU.
The syntax fro using NetSendOU.bat is:
NetSendOU OU Message
Where OU is the organizational unit, like "OU=West Coast,DC=JSIINC,DC=COM", and
Message is the message text, like "Hello world".
NetSendOU.bat contains:
@echo off
if {%2}=={} @echo Syntax: NetSendOU OU "Message"&exit /b 1
setlocal
set query=dsquery user %1 -o samid
set message=%2
for /f %%u in ('%query%') do (
net send "%%u" %message%
)
endlocal
exit /b 0



Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top