Last active
August 9, 2019 15:07
-
-
Save irlperu/67bcb8e8a342b99b86f2737000265aa1 to your computer and use it in GitHub Desktop.
Turn off AD Connect and leave users as Cloud Only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://support.microsoft.com/en-us/help/2619062/you-can-t-manage-or-remove-objects-that-were-synchronized-through-the | |
# Connect to AAD | |
Connect-MsolService | |
# Disable AAD Connect Sync atAAD Level -- This will set users to be Cloud Only | |
Set-MsolDirSyncEnabled -EnabledDirSync $false | |
# To Check the Status of the previous command, run the following command | |
(Set-MsolDirSyncEnabled).DirectorySynchronizationEnabled | |
# To re-enable AAD Connect syncronization | |
Set-MsolDirSyncEnabled -EnableDirSync $true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment