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

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

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

Step 4
This is my synced users from On-prem

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

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

Step 7
This command for checking Azure AD Connect is enabled or disabled
If it's showing True that means Enabled
(Get-MsolCompanyInformation).Directorysynchronizationenabled

Step 8
Now I'm going to disable Synchronization. Following the cmdlet
Set-MsolDirSyncEnabled -EnableDirSync $false

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

Step 10
Now I'm going to uninstall Azure AD Connect

Step 11
Successfully I have removed Azure AD Connect from my Domain Controller

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

Step 14
I completely removed my Azure AD sync Service

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

Join the conversation! Your thoughts help the community grow.