Hi
I have this script which calls Management Action to display a notification. The real script is used to notify users of successfull backup. But this is the minimal barebones example.
#!/bin/sh
'/Library/Application Support/JAMF/bin/Management Action.app/Contents/MacOS/Management Action' -title 'Test of Notification' -message 'It worked'
echo "Management Action exit code = " $?
I also made a policy to run this script as ongoing on my testcomputer. It succefully shows an notification if I do the following:
- Run it from self service
- Provoke the policy by: sudo jamf policy
but it fails to show an notification when invoked by
- the computer checking in and running the policy
- running it with Casper Remote
and the script just logs:
Management Action exit code = 0
All this works on 10.9.
Note: on 10.11 which isn't really supported yet (we still run 9.8 and not 9.81) it also output this:
[82004:2106277] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2015-10-06 11:22:56.350 Management Action[82004:2106277] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2015-10-06 11:22:56.350 Management Action[82004:2106277] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2015-10-06 11:22:56.352 Management Action[82004:2106277] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data



