When you try to remove the Azure Active Directory Sync tool , the uninstallation may not be successful, either because you did not uninstall the right product in the Programs and Features menu , or because the installation is corrupt.
In these cases, you may see the following error in the Azure Active Directory wizard: " Unable to install the Synchronization Service. PLease see the event log for additional details .
Here are some ways to manually uninstall Azure Active Directory Sync.
Uninstalling products
In the Programs and Features menu , uninstall all of the following products:
With Azure Active Directory Connect
- Microsoft Azure Active Directory Connect Tool
- Microsoft Azure AD Sync
- Forefront Identity Manager Windows Azure Active Directory Connector
- Microsoft SQL Server 2012 Express LocalDB
- Microsoft SQL Server 2012 Native Client
- Microsoft SQL Server 2012 Command Line Utilities
- Microsoft Online Services Sign-in Assistant (restart required)
- Windows Azure Active Directory Module for Windows Powershell
With Azure Active Directory Sync (standalone)
- Microsoft Azure AD Connection Tool
- Microsoft Azure AD Sync
- Forefront Identity Manager Windows Azure Active Directory Connector
- Microsoft SQL Server 2012 Express LocalDB
- Microsoft SQL Server 2012 Native Client
- Microsoft SQL Server 2012 Command Line Utilities
- Microsoft Online Services Sign-in Assistant (restart required)
- Windows Azure Active Directory Module for Windows Powershell
Deleting folders
The uninstall wizard does not remove some folders, which can cause problems during a reinstallation.
You must delete the following folders:
With Azure Active Directory Connect
- C: \ Program Files \ Microsoft Azure Active Directory Connect
- C: \ Program Files \ Microsoft Azure AD Sync
With Azure Active Directory Sync (standalone)
- C: \ Program Files Azure AD Connection Tool
- C: \ Program Files \ Microsoft Azure AD Sync
Deleting the scheduled task
You must also delete the scheduled task that starts synchronizing objects in the cloud.
- Open the Task Scheduler
- In the Task Scheduler Library container , right-click Azure AD Sync Scheduler and click Delete
Cleaning the registry
Open the registry as an administrator and delete the following keys if they still exist:
With Azure Active Directory Connect
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ AD Sync
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Azure AD Connect
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SQL Server Local DB
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSOLCoExistence
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall \ MicrosoftAzureADConnectionTool
- HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ ADSync
- HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ EventLog \ Application \ AzureActiveDirectoryDirectorySyncTool
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Tracing \ AzureADConnect_RASAPI32
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Tracing \ AzureADConnect_RASMANCS
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Tracing \ DirectorySyncTool_RASAPI32
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Tracing \ DirectorySyncTool_RASMANCS
With Azure Active Directory Sync (standalone)
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ AD Sync
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SQL Server Local DB
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSOLCoExistence
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall \ MicrosoftAzureADConnectionTool
- HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ ADSync
- HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ EventLog \ Application \ AzureActiveDirectoryDirectorySyncTool
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Tracing \ DirectorySyncTool_RASAPI32
- HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Tracing \ DirectorySyncTool_RASMANCS
You can now restart the installation of Azure Active Directory Connect.