You need to enable remote management on your mac machines to give you the ability to vnc using your local administrator credentials to easily remotely troubleshoot any Mac issues that your end users may have, well this awesome GitHub Gist has the perfect SetRemoteManagement shell script to do the job.

To get it set up for you follow these simple tasks:

Importing the Script

  1. Head over to Management Settings in your JSS
  2. Now dive into Computer Management > Scripts
  3. Click, + New
  4. Give it a relevant Display Name, i..e SetRemoteManagement and a relevant Category, i.e. Scripts
  5. Click the Script tab and paste the code from the GitHub Gist
  6. Change the “username” at the top of the script to your relevant local administrator username:

Making your Policy

  1. Now create your policy by clicking on Policies then clicking + New
  2. Give your policy an appropriate name, i.e. Set Remote Management and set the trigger based on your preference, for my policy I used the following:
    • Trigger: Recurring Check-In
    • Execution Frequency: Once Per Computer
  3. Next, let’s configure the script section, click Scripts then click Configure
  4. Find the script you made in the section above and click Add
  5. Optional: Configure an inventory update, Click on Maintenance, click Configure and check Update Inventory
  6. Assign the relevant Scope of where you want the policy to go, then hit Save

Once your machines check in they will now run the script above and enable the local administrator account you specified able to remotely manage the mac.

Let me know how it goes down below!