Category filter

Script to fetch the applications running in the foreground on Mac

Users may have to run several applications on their Macs simultaneously to perform various functions and activities. However, there are chances that they may misuse their corporate devices and run certain applications that could be harmful.

This document guides you on how to fetch the list of applications running in the foreground on a Mac. Hexnode’s Custom Script feature streamlines the process of running scripts on your devices directly from the Hexnode UEM console.

Disclaimer:

The Sample Scripts provided below are adapted from third-party Open-Source sites.

Fetching the list of applications

You can fetch the list of all the applications running in the foreground on your Mac by running the script given below:

Upon executing the script, all the applications running in the foreground on your Mac will be displayed on the portal.

Notes:

  1. It is recommended to manually validate the script execution on a system before executing the action in bulk.
  2. Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository