A cloud-based identity and access management service for securing user authentication and resource access
Check the Entra Connect installation trace for a stale Azure AD Sync Engine product code, then remove that specific product code before restarting the installation; the message indicates setup is detecting remnants of the previous installation rather than beginning cleanly.^1^
1. Identify the residual installer entry
Perform these actions directly on the Entra Connect server while signed in as a local administrator:
- Start the Microsoft Entra Connect wizard and wait until its first page appears.
- Open:
%ProgramData%\AADConnect\ - Open the newest installation trace log.
- Search for:
GetInstalledPackagesByUpgradeCode - Look specifically for an Azure AD Sync Engine entry reported as:
-
stale product code -
inconsistent product code - installed even though the
ADSyncservice no longer exists
-
Record the associated product-code GUID. Do not use an example GUID—the value differs between installations.^1^
2. Remove the confirmed stale product code
Only if the trace confirms a stale or inconsistent Azure AD Sync Engine product code:
- Open Command Prompt as administrator.
- Replace the example value below with the GUID found in your trace:
SET productcode={<12345678-0000-abcd-0000-0123456789ab>} SET /a counter+=1 & MSIEXEC /x %productcode% /qn /norestart /l*v "%ProgramData%\AADConnect\AADConnect_Uninstall-ForcedUninstall_%counter%.log" EXECUTE_UNINSTALL="1" - Run the
MSIEXECcommand a second time. - Restart the server.
- Start Entra Connect, reopen the latest trace in
%ProgramData%\AADConnect\, and confirm that the stale product code is gone. - Continue the installation and create a new configuration instead of resuming the incomplete one.
This forced removal affects the product identified by the GUID, so verify the GUID against the trace before running it.
3. If the stale code remains
Run Microsoft’s Program Install and Uninstall troubleshooter, restart the server, and inspect the newest %ProgramData%\AADConnect\ trace again. Microsoft documents this as the next step when Windows Installer is blocking installation or removal and has corrupted installer registration.^1^
If the stale code is removed, rerun setup. If it remains, Microsoft’s documented recovery path is to reinstall Windows because the Windows Installer database might be unrecoverable.
Warning: Reinstalling Windows is destructive and can remove applications, data, certificates, service credentials, and server configuration. Before doing so, have a verified backup, document the previous Entra Connect configuration, preserve required credentials and certificates, and use an approved recovery or migration plan.
If no stale product code appears
Do not run the forced MSI removal. The failure is then at the configuration/sign-in stage rather than Windows Installer cleanup. Review the newest files in %ProgramData%\AADConnect\ for the first authentication or connectivity error. Microsoft lists connectivity to on-premises AD, connectivity to Microsoft Entra ID, and AD connector-account permissions as common installation issues.^2^
Also verify in Control Panel → Uninstall a program that Microsoft Entra Connect is no longer listed. The supported uninstall process requires selecting Microsoft Entra Connect, choosing Remove, completing the wizard, and refreshing the program list.^3^
If configuration still fails, provide the first ERROR entry and approximately 20 lines around it from the latest trace, with tenant names, usernames, and identifiers redacted.
References