Unbind my mac from AD

expand collapsive

Hello… I need to unbind a few mac devices from the active directory that it has been associated with. Getting to the AD portal is not an option right now. So I have to find another way around this. Can anyone help me with this. Thanks in advance for the help.

All Replies

  • Hey @96anneette,
    Welcome to the Hexnode community.

    Currently, Hexnode doesn’t have an option to unbind a Mac from an Active Directory. However, you can unbind the device by running a Bash script on the device using the Execute Custom Script action. Use the script below to unbind the device.

    Replace <username> with the Domain admins username and <password> with the respective password.

    You can also unbind AD at the device level. Search for Directory Utility using the Spotlight Search on your macOS device. The Services page lists all of the services to which the device is connected. To make modifications, click the lock symbol and enter the admin credentials. Unbind the service by selecting it and clicking the Unbind option. For further information, follow the link.

    Hope that helps your query.

    Johan Blake
    Hexnode UEM

  • Participant



    I have a doubt regarding the command. If we specify garbage credentials or not give any credentials, the device will be disassociated from the ad. So what difference does it make to specify the username and password correctly.

  • Participant



    When giving the username and password, it will initiate a clean unbind of the device from the ad. This would require the user to have appropriate admin rights to remove computer objects completely from the ad. Removing the computer object will delete all details associated with the device in the ad.

    Meanwhile, giving wrong credentials just deletes some files on the device saying the device is connected to the ad. This terminates the connection with the ad and no further actions are possible. But device details will remain in the ad.