How to Fully Remove Microsoft Azure AD Connect

IT

How to Fully Remove Microsoft Azure AD Connect

Microsoft Azure AD Connect

Microsoft’s Azure AD Connect is a great tool that allows admins to sync Active Directory credentials from local domain environments with Microsoft’s cloud (Azure/Office 365), eliminating the need for users to maintain separate passwords for each.

While not a common occurrence, there may be reasons that you would need to remove Microsoft’s Azure AD Connect utility from your environment. This can be achieved in a few short steps and involves both removal from the local domain environment as well as deactivating the service in the cloud.

Step 1

Open PowerShell (Run as Administrator).

Step 2

Install 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.

Step 3

Input login credentials using the following PowerShell command:

$msolcred = get-credential

You will be prompted to authenticate. Use the global administrator account within your Office 365 tenant (ex. user@yourdomain.com) and the corresponding password.

Step 4

Initiate Connection to Office 365 using the following PowerShell command:

connect-msolservice -credential $msolcred

Step 5

Keep this PowerShell instance open, we will use it in later steps.

Step 6

Uninstall Azure AD Connect application (and services) from your local domain environment using Control Panel.Uninstall Microsoft Azure AD Connect

Step 7

Once you have AD Connect uninstalled, you will still need to disable the service through office 365. To do so, use the following PowerShell command.

Set-MsolDirSyncEnabled -EnableDirSync $false

You will be prompted to confirm, press Y to confirm and then press Enter.

Confirm?

Step 8

To verify that directory sync was fully disabled, use the following PowerShell command:

(Get-MSOLCompanyInformation).DirectorySynchronizationEnabled

A returned value of False will validate the deactivation.

Need to Reenable AD Connect?

If you ever need to reenable AD Connect, repeat the PowerShell procedures above and use the following command in place of step 7:

Set-MsolDirSyncEnabled -EnableDirSync $true

Please note depending on the size of your AD environment, you may have to wait several hours before Microsoft will allow you to reactivate. You can then reinstall and configure Azure AD Connect in your environment.

More About the Author

Marshall Roy

Systems Engineer
How to Fully Remove Microsoft Azure AD Connect Microsoft’s Azure AD Connect is a great tool that allows admins to sync Active Directory credentials from local domain environments ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072