How To Completely Remove Microsoft Azure AD Connect

Introduction 

This article is about how to completely remove Microsoft Azure AD connect and stop directory synchronization between on-premises Active Directory and Azure Active Directory.

Step 1

This is my domain controller DC01.rapidtech365.local which is integrated with Azure ADDS

How to Completeley Remove Microsoft Azure AD Connect

Step 2

Now I'm going to check the Azure AD sync status. You can access your azure portal using this URL https://aad.portal.azure.com

How to Completeley Remove Microsoft Azure AD Connect

Step 3

This is my On-prem user which is integrated with Azure AD Connect.

How to Completeley Remove Microsoft Azure AD Connect

Step 4

This is my synced users from On-prem

How to Completeley Remove Microsoft Azure AD Connect

Step 5

First I’m going to Install MSOnline module on the domain controller using Powershell cmdlet. Open PowerShell as Admin and type following the command.

Install-Module AzureAD
Install-Module MSOnline

Once you run the cmdlet it will ask prompt message just give (A) to install the modules

How to Completeley Remove Microsoft Azure AD Connect

Step 6

Following the cmdlet to connect to your M365 Portal.

Once you enter the cmdlet it will ask you to log in to the portal, just give your Global credential 

Connect-MsolService

How to Completeley Remove Microsoft Azure AD Connect

Step 7

This command for checking Azure AD Connect is enabled or disabled 

If it's showing True that means Enabled 

(Get-MsolCompanyInformation).Directorysynchronizationenabled

How to Completeley Remove Microsoft Azure AD Connect

Step 8

Now I'm going to disable Synchronization. Following the cmdlet

Set-MsolDirSyncEnabled -EnableDirSync $false

How to Completeley Remove Microsoft Azure AD Connect

Step 9

Now you can see my Azure AD connect is disabled successfully.

How to Completeley Remove Microsoft Azure AD Connect

Step 10

Now I'm going to uninstall Azure AD Connect

How to Completeley Remove Microsoft Azure AD Connect

Step 11

Successfully I have removed Azure AD Connect from my Domain Controller 

How to Completeley Remove Microsoft Azure AD Connect

Step 12

Uninstall Azure AD Connect Agent Updater and restart your Domain Controller 

Step 13

Browse from C:\Program Files and Delete all azure ad related folders 

How to Completeley Remove Microsoft Azure AD Connect

Step 14 

I completely removed my Azure AD sync Service 

How to Completeley Remove Microsoft Azure AD Connect

Conclusion 

This article taught us how to remove properly Azure AD Connect. If you have any questions, please contact me.

Thanks.


Similar Articles