# How to Image a Mac with a Pre-Installed Agent Last Updated On: 15 Oct 2026 We support the three principal operating systems: Windows, macOS, and Linux. [OS imaging and deployment](https://www.manageengine.com/products/desktop-central/os-deployment.html) is the fundamental step in managing computers in your network. This document will guide you through the pre and post installation script execution in imaging a Mac computer with Endpoint Central Agent on it. **Note** **OS Deployment does not currently support macOS or Linux imaging. Please let us know [here](https://www.manageengine.com/products/os-deployer/product-roadmap-add-details.html?id=230) if you'd like macOS imaging support.** ## Steps 1. Download [pre-installation script](https://www.manageengine.com/products/desktop-central/dcagentpreimage_Mac.txt) in the machine that is to be imaged and **rename .txt file as .sh file**. **Note** Execution of this script will block the Agent-Server communication on a temporary basis. 2. Open the terminal and navigate to the folder where pre-installation script is stored. 3. Execute the command **sudo ./dcagentpreimage_Mac.sh** and the machine is now ready to be imaged. - **Endpoint Central Mac agent, residing on the computer with the deployed OS image, will contact the server only if renamed.** Here's why! - Every Endpoint Central Agent has a **unique resource ID** that is indicative of the machine name and other details. If more then one agent is identified with the same ID, the details of both the agents will be overwritten. This would end up listing the details of only one machine, despite two machines having the same agent ID. In order to avoid this situation, it is mandatory to rename the agent name in the computer with deployed OS image. 4. Follow these steps for **restoration of agent-server communication in the computer that was imaged**: - Download [post-installation script](https://www.manageengine.com/products/desktop-central/dcagentpostimage_Mac.txt) in the computer that was imaged and **rename .txt file as .sh file**. - Open the terminal and navigate to the folder where post-installation script is stored. - Execute **sudo ./dcagentpostimage_Mac.sh**. - Upon the successful execution of this script, agent-server communication will be restored.