KnowledgeBase: You cannot uninstall Azure AD Connect from Programs and Features

Azure AD Connect

Sometimes, the configuration of Azure AD Connect goes wrong and stops. Azure AD Connect can end up in a state where you can no longer recover. Alas, in these cases uninstallation may also not be an option… or so it seems.

 

The situation

Azure AD Connect is installed on a Windows Server installation, but not configured or unable to resume configuration.

Admins now want to remove Azure AD Connect.

From the Start Menu the Add or remove programs item is searched and selected, or from the Start right-click menu (Start + X) the Apps and features menu option is chosen.

In the Apps & features window of Settings, the Microsoft Azure AD Connect item is selected. The button Uninstall is pressed.

In the This app and its related info will be uninstalled. pop-up, the button Uninstall is also pressed.

 

The issue

The following error appears:

Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item. (click for original screenshot)

Windows states it cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.

 

The cause

The uninstallation option for Azure AD Connect in the Add & Features screen is broken.

 

The solution

You can uninstall Azure AD Connect using the right uninstaller.

The information we need can be gathered by issuing the following command line:

wmic.exe product

For the Microsoft Azure AD Connect product, you’ll see a *.msi file listed in the LocalPackage column. This file is located in the C:\Windows\Installer\ folder.

Perform the following steps:

  • Double-click the *.msi file.

Welcome to the Microsoft Azure AD Connect Setup Wizard

  • Click Next on the Welcome to the Microsoft Azure AD Connect Setup Wizard page of the Microsoft Azure AD Connect Setup wizard.
  • Click Remove on the Change, repair or remove page of the wizard.
  • Click Remove on the Ready to remove Microsoft Azure AD Connect page of the wizard.
    The Microsoft Azure Active Directory Connect appears.
  • Click Remove. to also uninstall the Azure AD Sync Engine, Microsoft SQL Server 2012 Command Line Utilities, Microsoft SQL Server 2012 Native Client and Microsoft SQL Server 2012 Express LocalDB.
  • Click Exit when uninstallation is completed.

 

Concluding

After Azure AD Connect is correctly removed from the Windows Server, you can start installation and configuration of Azure AD Connect from scratch, or decide to install Azure AD Connect on another Windows Server installation.

If your goal is to get rid of Azure AD Connect, then you’ve completed your goal.

leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.