Cannot uninstall Azure AD connect

Kenny Chia 0 Reputation points
2023-05-10T18:07:05.31+00:00

Hello,

We were having issue with the AAD connect, and the service could not start at all. Tried using the domain admin to start the service, and it failed as well. So, we are trying to uninstall the AAD connect and reinstall again.

However, we cannot uninstall the AAD and returned with error

InvalidOperationException - Service ADSync was not found on computer'

Any insight to remove it and reinstall again?

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2023-05-10T18:26:35.17+00:00

    It sounds like there may be some remnants of the AAD Connect service left on the computer, which is causing issues when trying to uninstall and reinstall. Here are some steps you can take to try and resolve this issue:

    1. Open an elevated command prompt by right-clicking on Command Prompt and selecting "Run as administrator".
    2. Type the following command: sc delete ADSync and press Enter. This should remove any remaining service entries related to AAD Connect.
    3. Navigate to the Control Panel > Programs and Features, and try to uninstall AAD Connect again.

    If the uninstall still fails, you can try the following steps:

    1. Download the latest version of AAD Connect from the Microsoft website.
    2. Open an elevated command prompt and navigate to the directory where the AAD Connect installer is located.
    3. Run the following command: msiexec /x "MSI Filename" /L*v "Log Filename". Replace "MSI Filename" with the name of the AAD Connect installer file and "Log Filename" with a desired name for the installation log file.
    4. This should start the uninstallation process and create a log file for any errors encountered during the process.
    5. Once the uninstallation is complete, try reinstalling AAD Connect using the latest installer you downloaded.
    0 comments No comments

  2. Limitless Technology 44,746 Reputation points
    2023-05-18T13:04:06.0066667+00:00

    Hello there,

    This document describes how to correctly uninstall Azure AD Connect.

    The first thing you need to do is remove Azure AD Connect from the server that it is running on.

    https://learn.microsoft.com/en-us/azure/active-directory/hybrid/connect/how-to-connect-uninstall#uninstall-azure-ad-connect-from-the-server

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.