Share via

Getting Service ADSync was not found on computer trying to reinstall

Mike Garczynski 1 Reputation point
2026-05-07T21:43:29.6666667+00:00

I am trying to re-install Microsoft Entra Connect Sync on my local AD server running Windows Server 2022 Standard and getting and error InvalidOperationException Service ADSync was not found on computer. I followed Microsoft KB's on how to uninstall/reinstall and don't remember specifically deleting the service.

How does the ADSync service get installed? I did attach the log

Microsoft Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-05-07T21:43:41.9+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The ADSync Windows service is created and configured by the Microsoft Entra Connect (Azure AD Connect) synchronization engine MSI during installation. If the service is missing but setup still thinks an old sync engine is present, the Windows Installer database is usually inconsistent and holding on to a stale Azure AD Sync Engine product code.

    In this state, the Entra Connect setup tries to run an upgrade instead of a clean install, then fails when it checks the service status and cannot find ADSync:

    ServiceControllerProvider: verifying ADSync is in state (Running) … Service ADSync was not found on computer '.'

    To get the ADSync service installed again, the inconsistent sync engine entry must be cleaned from Windows Installer so that Entra Connect can perform a fresh installation of the synchronization service.

    Use the following approach:

    1. Confirm the stale Azure AD Sync Engine product code
      1. Start the Microsoft Entra Connect wizard and wait for the first page.
      2. Open %ProgramData%\AADConnect\ and open the latest installation trace log.
      3. Search for GetInstalledPackagesByUpgradeCode and identify the Azure AD Sync Engine product entry that setup believes is installed.
    2. Fix Windows Installer issues (if KB3139923 is present)
      1. Check installed hotfixes via Settings > Windows Update > Update history or with PowerShell:
              Get-Hotfix |
              Select-Object HotFixID, InstalledOn, Description, InstalledBy |
              Sort-Object –Property InstalledOn –Descending |
              Out-File –FilePath ".\$env:COMPUTERNAME-HotFixes.txt"
        
      2. If KB3139923 is installed, uninstall it and restart the server.
      3. Install KB3072630 and restart again.
    3. Force‑uninstall the stale Azure AD Sync Engine product code
      1. From the trace log, copy the problematic product code GUID for Azure AD Sync Engine.
      2. Open an elevated Command Prompt.
      3. Set the product code variable (replace with the actual GUID):
              SET productcode={<12345678-0000-abcd-0000-0123456789ab>}
        
      4. Run the forced uninstall (this may show errors because the MSI state is already broken; accept prompts):
              SET /a counter+=1
              & MSIEXEC /x %productcode% /qn /norestart /l*v "%ProgramData%\AADConnect\AADConnect_Uninstall-ForcedUninstall_%counter%.log" EXECUTE_UNINSTALL="1"
        
      5. Restart the server.
    4. Verify that the stale product code is gone
      1. Start the Entra Connect wizard again and wait for the first page.
      2. Open %ProgramData%\AADConnect\ and check the latest installation trace log.
      3. Confirm that the inconsistent product code no longer appears.
      4. If it is gone, proceed through the wizard; the installer should now perform a clean install and create the Microsoft Azure AD Sync (ADSync) service.
    5. If the product code persists, repair Windows Installer
      1. Run the Program Install and Uninstall troubleshooter from Microsoft to repair MSI and registry issues.
      2. Restart the server.
      3. Start the Entra Connect wizard again and re-check the trace log.
      4. If the stale product code still appears after using the troubleshooter, the Windows Installer database is considered unrecoverable; the documented guidance is to reinstall the Windows operating system before attempting Entra Connect again.

    Once the MSI can run a clean installation without seeing the stale sync engine entry, it will install the synchronization service binaries and register the ADSync Windows service automatically; there is no separate manual service creation step.


    References:

    Was this answer helpful?

Your answer

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