Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

In the RM CC4 console there is the ability to send messages to all or some of the workstations on the network.

 

Is there something similar for a vanilla network?

Posted
@mavhc, I'm aware of that but that's only to a single workstation at a time.

 

I need something that I can broadcast messages to the entire LAN.

 

@filename Identifies a file containing a list of usernames,

sessionnames, and sessionids to send the message to.

 

Or do it by searching AD for computers, something like

$ou = $args[0]
$time = $args[1]
$msg = $args[2]

write-output "Sending message to computers in OU: $ou"
$ldappath = 'LDAP://OU=' + $ou + ',DC=domain,DC=local'
write-output $ldappath

# Not using Get-ADComputer as that requires things installing
$DirSearcher = New-Object DirectoryServices.DirectorySearcher([adsi]$ldappath)
#Write-Output $dirsearcher
$DirSearcher.Filter = '(objectClass=Computer)'
try {
$computers = $DirSearcher.FindAll().GetEnumerator() | ForEach-Object { $_.Properties.name }
}
catch {
$computers = $class
}


foreach($t in $computers)
{
 msg /server:$t * /time:$time "$msg"
 write-output $t $time $msg
}

 

Although you'd probably want to use "ForEach-Object -throttlelimit 20 -parallel" from PS7 to avoid the computers that are off.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...