Skip to content

NKCODE TECH GEEK ZONE

  • RSS - Posts
Menu
  • Home
  • Cloud
    • Azure
    • Alibaba
    • AWS
  • Hardware
  • Linux
  • Network
  • Security
  • Windows Client / Servers
    • SQL
    • Windows Client OS
      • Windows 10
    • Windows Servers
      • Windows 2008R2
      • Windows Server 2012R2
      • Windows Server 2016
      • Windows Server 2019
  • VMWARE
  • Free Tools
  • About Me
    • Disclaimer
Menu

Disable and Remove the Microsoft Azure Active Directory Connect (AAD)

Posted on January 5, 2020

Microsoft Azure AD Connect is a hybrid connection tool for sync the local on-premise environment domain controller sync with Microsoft Azure Cloud (Azure/Office 365) single sign-on (SSO) user to connect both cloud and on-premise application and Administrator to manage the user credentials with the same password.

For decommission or upgrading the local environment, Azure AD Connect would need to remove properly. The below steps for deactivating the service from the cloud and on-premise.

Open PowerShell (Run as Administrator).

Install the Microsoft Online module for Azure Active Directory using the following command:

Install-Module -Name MSonline

If prompted to continue, input “Y” and press enter. Any subsequent confirmations can be accepted by inputting “A” for “Yes to All” and pressing Enter.

 

 

Run the following command to connect to the Azure Active Directory of the tenant for which you are disabling AD Sync.

Connect-MsolService

Enter the Global Administrator credentials for Azure AD/Office 365 tenant.

Disable the Directory Sync type below command.

Set-MsolDirSyncEnabled –EnableDirSync $false

Enter the below command to verify if Dir sync is disabled.

(Get-MSOLCompanyInformation).DirectorySynchronizationEnabled

Open Control panel in the local AAD connect server and uninstall Microsoft Azure AD Connect.

Remove from Local AD below.

  1. Remove service account created by AAD connect from AD. Check Users container for an account like MSOL_GUID. Description of the service account has the name of the AAD connect server for identification.
  2. Remove the local AAD groups created by AAD installation, if you are not planning to install AAD connect again. If you have installed AAD connect on a DC, these will be AD group. Keep them for other AAD connect installations or if you have or plan to have.

 

Login to Azure and select Azure Active Directory – Custom Domain Names

 

Select Domain and Delete 

Type the domain name and Select Delete

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...

Related

Welcome to Teck Geek Zone

Alibaba & Azure Cloud with a free trial worth $200-1200 USD Click below Cloud Providers

  • Securing Your Cloud Environment with Alibaba Cloud Firewall
  • 🚢 Sailing into the Data Age: How Cloud and IoT are Revolutionizing the Marine Industry
  • What is Azure Grafana? A Comprehensive Guide to Monitoring and Visualization
  • 🔐 How to Enable Virtualization-Based Security (VBS) for Windows Workloads in VMware Cloud Foundation and vSphere
  • Microsoft’s Azure SRE Agent: AI-Powered Reliability Engineering

Categories

  • Cloud (186)
    • Alibaba (39)
    • AWS (39)
    • Azure (114)
  • Free Tools (5)
  • Hardware (17)
  • Linux (13)
  • Network (28)
  • Security (21)
  • VMWARE (54)
  • Windows OS (44)
    • Windows 10 (7)
  • Windows Servers (69)
    • SQL (3)
    • Windows 2008R2 (7)
    • Windows Server 2012R2 (15)
    • Windows Server 2016 (20)
    • Windows Server 2019 (10)

Subscribe to our newsletter

©2025 NKCODE TECH GEEK ZONE | Design: Newspaperly WordPress Theme
 

Loading Comments...
 

    %d