skip to Main Content

Uninstall Azure AD Connect

We like to uninstall Azure AD Connect. The organization will not use Azure AD Connect anymore to sync AD objects between on-premises AD and Azure AD because the servers are moved to the cloud. This is when we like to delete Azure AD Connect. In this article, we will look at how to remove Azure AD Connect from server.

Locate Azure AD Connect server

Start PowerShell as administrator. Make sure that you have privileges to search in Active Directory. After running the cmdlet, we do know that it’s installed on the server DC01.

PS C:\> Get-ADUser -LDAPFilter "(description=*configured to synchronize to tenant*)" -Properties description | % { $_.description.SubString(142, $_.description.IndexOf(" ", 142) -142)}

Turn off directory synchronization

Disable directory synchronization in two places:

  1. On-premises AD
  2. Azure AD

Turn off directory synchronization on-premises AD

Sign in to the Windows Server, where you have Azure AD Connect installed and configured. Start PowerShell as administrator and run Import-Module ADSync. Follow with the Set-ADSyncScheduler cmdlet to stop the synchronization.

PS C:\> Import-Module ADSync

PS C:\> Set-ADSyncScheduler -SyncCycleEnabled $false

Turn off directory synchronization Azure AD

In the same Windows PowerShell window, install and connect to Azure AD.

PS C:\> Connect-MsolService

Turn off directory synchronization and convert your synchronized users to cloud-only. Run the Set-MsolDirSyncEnabled cmdlet to stop the synchronization.

PS C:\> Set-MsolDirSyncEnabled -EnableDirSync $false

Uninstall Azure AD Connect from server

Click on Start > Control Panel > Programs and Features. Click on Microsoft Azure AD Connect and press on Uninstall.

Note: The wizard will uninstall the supporting components: Microsoft Azure AD Connect Health agent for sync, Microsoft Azure AD Connect synchronization services, and Microsoft SQL Server.

Uninstall Azure AD Connect programs and features

The Uninstall Azure AD Connect wizard shows up. Check the checkbox Also uninstall supporting components. Click Remove.

Uninstall Azure AD Connect remove

Give it a couple of minutes, and you will see the green checkmarks. Azure AD Connect is successfully uninstalled. Click Exit.

Uninstall Azure AD Connect finish

Azure AD Connect is removed from the Programs and Features list.

Uninstall Azure AD Connect programs and features after uninstall

Start File Explorer. Go to C:\Program Files. Right-click Microsoft Azure AD Sync folder and click on Delete to remove Microsoft Azure AD Sync folder.

Uninstall Azure AD Connect delete folder in program files

In File Explorer, navigate to the C:\Users folder. Remove the AAD_ folders. You may see folders with the prefix ADSyncMSA_. If so, remove these — more information about the ADSync service account.

Delete AAD_ folder in users

Azure AD Connect is successfully removed. Did this help you to remove Azure AD Connect from server?

Read more: Upgrade Azure AD Connect »


In this article, you learned how to uninstall Azure AD Connect. First, go through the uninstall wizard. After that, delete Azure AD Connect folders in File Explorer. You can always reinstall Azure AD Connect on the same server.

Did you enjoy this article? You may also like Force sync Azure AD Connect with PowerShell. Don’t forget to follow us and share this article.



ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 5 Comments

  1. Just want to double-check, so before removing Azure ADC we would need to ensure that new user objects were created in Azure as the sync’d objects would not really be useful going forward.

    Would this be a fair statement?

    Thanks in advance

  2. Hi Ali, Thanks for the article.

    So after removing the Azure AD Connect – we can change password, make changes to user accounts, groups in M365 directly right?

    As with Azure AD in place we cannot make changes to M365, all changes gets synced from Local AD.


    1. Hi Jatin,

      That’s correct. As long as your AD (Authority) is on-premises, you should keep Azure AD Connect and manage everything on-premises.

      Suppose there is no need anymore to manage users from on-premises and no longer require directory synchronization or password synchronization. In that case, you can uninstall Azure AD Connect and manage everything in Microsoft 365.

Leave a Reply

Your email address will not be published.