I like notification center for non-obtrusive messages so typically use Yo, Terminal-Notifier, or sometimes AppleScript. Sadly JAMFHelper takes focus so any message interrupts what the user is doing (typing an email..?) and get unhappy.
Looks like that's not possible in 10.11 anymore... This works 10.10 and under. What are people doing for notifications in scripts?
#!/bin/sh
currentUser=`ls -l /dev/console | awk '{print $3}'`
notify(){
message=$1
lwpid=`ps auxw |grep loginwindow |grep -v grep | awk '{print $2}'`
uid=`id -u $currentUser`
gid=`id $currentUser|awk -Fgid= '{print $2}'|awk -F( '{print $1}'`
/bin/launchctl bsexec $lwpid chroot -u $uid -g $gid / osascript -e "display notification "$message" with title "Updates""
}
notify "I love JAMF."