I at first did this action becuase i was bored and wanted to have fun with people but i have started getting real use from it as of late and figured i would share it.
pre reqs
you will ned to place the following files in your custom actions folder
PSexec
Nircmd.exe (I renamed it Speak in my batch)(NOTE nircmd is an AMAZING tool for sys admins)
speak.bat
custom action code:(NOTE this could use some cleaning up I used it from a different CA)
cmd.exe /K "{actionpath}speak.bat {actionpath} {ipaddress} {actionpath} {actionpath} {ipaddress}"
Speak.bat
@echo off
%1psexec.exe \\%2 taskkill /F /IM speak.exe
XCOPY "%3speak.exe" \\%2\c$\windows\system32\ /Y
:input
set INPUT=
echo.
echo.
WMIC /Node:%2 ComputerSystem Get UserName
echo.
set /P INPUT=Type Message here: %INPUT%
%1psexec.exe \\%2 -i %3speak.exe speak text %INPUT%
cmd DEL c:\Windows\System32\speak.exe"
there are a few things happening here first we are checking to make sure the speak.exe process is not running on the remote machine if it isnt it will just say that there is no process found if it is it will kill it next we will copy the file over. now i know this is very sloppy but its ok its a batch file. next it will check to see who is logged in to the computer so if you want to talked to them directly you know who it is. Next you can type in what you want to say. the second to last command uses the -i command which executes it to whoever has an active desktop on that computer AKA the current user that is logged in. next it will delete the original file. let me know what you think im sure there is ways to make this much better. thanks