You can silently install Grammarly for Mac on multiple computers at once using Jamf cloud-based MDM tool (script method).
Minimum requirements: macOS 10.14 (Mojave) and up.
Deploying Grammarly for Mac Using JAMF (Script Method)
Step 1: Prepare a script.
- Log in to the Jamf instance and navigate to Computers → Computer Management → Scripts.
- Click the +New button in the top-right corner.
- Fill in the Display Name and assign the category in the General tab.
- Go to the Script tab, copy-paste the script below, and click the Save button.
#!/bin/sh
currentUser=$(ls -l /dev/console | awk '{ print $3 }')
dmgfile="Grammarly.dmg"
volname="Grammarly"
/bin/echo "--"
# check if logged in user has admin rights
IsUserAdmin=$(id -G $currentUser| grep -v 80)
if [ -n "$IsUserAdmin" ]; then
grammarly_dir="/Users/${currentUser}/Applications"
/bin/echo "`date`: $currentUser is not local admin"
else
grammarly_dir="/Applications"
/bin/echo "`date`: $currentUser is a local admin"
fi
# check if Applications folder exists
if [ -d "$grammarly_dir" ]; then
echo "Application folder exists"
else
echo "Application folder doesn't exist"
mkdir "$grammarly_dir"
chown -R "$currentUser":staff "${grammarly_dir}"
fi
# check Download link and availability of Grammarly CDN
if [ -z "$4" ]; then
url='https://download-mac.grammarly.com/Grammarly.dmg'
/bin/echo "No arguments supplied. Using default address"
else
url=$4
fi
/usr/bin/curl -f -s -I $url &>/dev/null
if [[ $? -eq 0 ]]; then
/bin/echo "`date`: Grammarly Desktop download site ${url} is available."
else
/bin/echo "`date`: Grammarly Desktop download site ${url} is NOT available."
exit 1
fi
/bin/echo "`date`: Checking and unmounting existing installer disk image"
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep "${volname}" | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Downloading latest version"
/usr/bin/curl -s -o /tmp/${dmgfile} ${url}
/bin/echo "`date`: Mounting installer disk image"
/usr/bin/hdiutil attach /tmp/${dmgfile} -nobrowse -quiet
/bin/echo "`date`: Installing..."
/bin/echo "${grammarly_dir}/Grammarly Desktop.app"
/usr/bin/sudo -u "$currentUser" cp -R "/Volumes/${volname}/Grammarly Installer.app" "${grammarly_dir}/Grammarly Desktop.app"
/usr/sbin/chown -R "$currentUser":staff "${grammarly_dir}/Grammarly Desktop.app"
xattr -r -d com.apple.quarantine "${grammarly_dir}/Grammarly Desktop.app"
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image"
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep "${volname}" | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image"
/bin/rm /tmp/"${dmgfile}"
/bin/echo "`date`: Setting onboarding deferral"
/usr/bin/sudo -u ${currentUser} defaults write com.grammarly.ProjectLlama deferOnboarding -bool YES
/bin/echo "`date`: Running the app"
/usr/bin/sudo -u ${currentUser} open "${grammarly_dir}/Grammarly Desktop.app" --args launchSourceInstaller
exit 0
Step 2: Create the Configuration profile to allow Grammarly for Mac to access the Accessibility.
- Navigate to Computers → Configuration Profiles and click the +New button in the top-right corner.
-
Fill in the General tab:
- Fill in the Name and Description.
- Choose a Category according to your organization’s settings.
- Ensure that the level at which to apply the profile is Computer Level.
-
Choose the desired Distribution Method:
- Select Install Automatically to push profile to scoped computers immediately.
- Alternatively, select Make Available in the Self Service to let users install it on their own:
-
Navigate to the Privacy Preferences Policy Control and click Configure. Fill in the following:
- Identifier: com.grammarly.ProjectLlama
- Identifier Type: Bundle ID
-
Code Requirement:
anchor apple generic and identifier "com.grammarly.ProjectLlama" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = W8F64X92K3)
- Check the Validate the Static Code requirement box.
- Click the Add button and select Accessibility in the App or Service dropdown menu.
- Select Allow from the Access dropdown menu:
- Navigate to the Scope tab and set the Deployment Targets, Limitation, and Exclusions.
- Once the Privacy Preferences Policy Control and the Scope are defined, click Save to begin the profile enrollment.
Note: In order to avoid the Accessibility prompt in the app, the configuration profile should be installed before the application is installed.
Step 3: Create and apply the Policy with script.
- Navigate to Computers → Policies and click the +New button in the top-right corner.
-
Under the General tab in the New Policy:
- Enter the policy name.
-
Select the trigger option according to your organization’s settings:
- Check the box near the Recurring check-in option to enroll this policy on all scoped computers during the next sync with the Jamf server.
- Alternatively, check Enrollment complete to trigger the policy immediately after a computer completes the enrollment process.
- Check Custom to set up your custom trigger.
- Leave all trigger options unchecked for the installation from the Self Service
- Select the Execution Frequency depending on your Jamf organization setting:
- Select Once per computer from the dropdown menu for initial enrollment.
- Alternatively, select Ongoing for the installation from the Self Service.
- Adjust other fields under the General tab such as Category, Server-side, or Client-side limitations according to your Jamf organization settings:
- Navigate to Scripts and click Configure.
- Choose the Grammarly Desktop script from the list.
- Optional: Adjust Maintenance tab to Update Inventory after the policy installation.
- Set the Deployment Targets, Limitation, and Exclusions under the Scope tab.
-
If the policy is set up for the installation from the Self Service, navigate to the Self Service tab:
- Check the Make the policy available in Self Service box
- Fill in the Self Service Display name, Button Name, and Description. Choose the Category according to your organization’s settings.
- You can find the app icon for the Self Service here: Grammarly Icon
Once you complete all the required fields, click the Save button to start the policy enrollment.