Hi all - I have a small issue.
Background - our organization pumped out the JAMF Enrol process to our existing fleet of Mac's via the old (now decommissioned) Mac Management System (not used anymore). This process was 100% successful in getting the Mac fleet enrolled in our JAMF instance.
The only issue is that we have a considerable amount of Mac computers that have not had the end-user manually Approve the JAMF MDM Profile in System Preferences.
I have created a Policy that runs a script on all Mac computers reporting to JAMF that have an Un)-approved MDM Profile.
When the Policy executes (at Recurring Check-in) the following error occues in the JAMF Policy status:
Script result: 36:476: execution error: An error of type -10822 has occurred. (-10822)
open requires some user to be logged in at the console, even when run as root.
Below is the script I am using in the Policy:
!/bin/bash
*osascript -e 'tell app "System Events" to display alert "You must Approve the Company MDM Profile for your Mac.
Click on the OK button below and do the following:
Click on the Profile labeled MDM Profile in the Device Profiles Column. It is identified by a yellow alert triangle.
Click on the Approve button.
When prompted, click on Approve again.
The Approval of the MDM Profile is critical in keeping your Mac maintained & secure."'
open /System/Library/PreferencePanes/Profiles.prefPane/
jamf recon
*
I have also tried using the JAMF Message System but of course if the MDM Profile has not been Approved and the end-user Mac side this will not work.
Any assistance would be greatly appreciated :)
Cheers - Paul