Kandji Terminal Commands

Learn how to operate Kandji inside terminal.app.

While Kandji is primarily hands-off after it is installed on a Mac, a few Terminal commands are available.


sudo kandji run

The agent will run and check-in immediately. Normally, the agent checks in every 15 minutes. Without an internet connection, the agent will run in offline mode.

sudo kandji run -F

Adding "-F" to the run command will force all parameters to run, including parameters that are not scheduled to run yet. For instance, if a parameter has already run earlier in the day, and only is enforced once a day. Application Inventory will also be updated (requires an internet connection).

Run Daily MDM

sudo kandji update-mdm

The agent will request the MDM server to initiate its daily MDM commands such as validating Apps and Books from Apple Business Manager, as well as querying certain device information. 


sudo kandji update

Checks for a new agent version and installs it immediately if found.

The agent checks for updates automatically twice each hour.



sudo kandji help

Displays help text.

Help is displayed when no arguments are supplied, or incorrect syntax is used.


Automated Device Enrollment NAG

sudo profiles renew -type enrollment


sudo profiles -N

Forces the Mac to check-in with Apple to determine if the device can be enrolled into MDM via Automated Device Enrollment. If it can, the Mac will prompt the end-user to enroll into your Kandji instance via a Notification Center alert like the one below.

In order for this command to work the device must be assigned to Kandji inside of Apple Business Manager and you must have a default blueprint configured.