Manually Uninstalling Azure AD Connect
If you are missing the removal MSIs or simply unable to remove Azure AD Connect via normal uninstallation methods, this will help you manually completely remove it.
Below is how to manually remove Azure AD Connect if it refuses to uninstall normally.
Uninstall all instances of Microsoft SQL LocalDB, Microsoft SQL Native Client and Azure AD Connect.
You'll probably need to use the Microsoft program uninstall fixer tool to accomplish this.
After doing the above..
Delete the program files located at: (you will need to stop the service named "AD Sync" otherwise it wont let you delete some of these)
- %ProgramFiles%\Microsoft Azure AD Connection Tool
- %ProgramFiles%\Microsoft Azure AD Sync
- %ProgramFiles%\Microsoft Azure Active Directory Connect
Remove the following registry keys:
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AD Sync
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Azure AD Connect
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSOLCoExistence
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Local DB
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ADSync
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\EventLog\Application\ADSync
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\EventLog\Application\AzureActiveDir
- ectorySyncEngine
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ADSync
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\EventLog\Application\ADSync
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\EventLog\Application\AzureActiveDir
- ectorySyncEngine
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ADSync
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\ADSync
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\AzureActiv
- eDirectorySyncEngine
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\EventLog\Application\ADSync
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\
Finally, reboot the machine running Azure AD Connect that we've just removed and you will be able to install it as normal.