Share the full error message, as you will be getting a similar error if the cmdlet was run successfully. Also share the output of:
Get-MSOLCompanyInformation | select DirectorySynchronizationStatus
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I try to turn off Azure AD Sync with on-premises AD. I am using "set-msoldirsyncenabled -EnableDirSync $false" powershell command but i have "You cannot turn off Active Directory synchronization" error. I am witing over 72h, currently few days. I was trying refresh domain catalogs, forcing syncing. Everything works good. What more can i do?
Share the full error message, as you will be getting a similar error if the cmdlet was run successfully. Also share the output of:
Get-MSOLCompanyInformation | select DirectorySynchronizationStatus
Hello @Mateusz Kubiś
In order to avoid waiting for 24-72 hours as per “https://learn.microsoft.com/en-us/office365/troubleshoot/active-directory/pending-state-issue-with-directory-synchronization?WT.mc_id=365AdminCSH_SupportCentral”, run the following command on your sync source server:
Start-ADSyncSyncCycle -PolicyType Delta
The following command kept returning “PendingDisabled”
(Get-MSOLCompanyInformation).DirectorySynchronizationStatus
After the delta sync, it should return to “Disabled”.
For more information:
Fix pending state issue with Directory synchronization for Microsoft 365, Azure, or Intune
https://learn.microsoft.com/en-US/office365/troubleshoot/active-directory/pending-state-issue-with-directory-synchronization
Hope this helps with your query!
------
--If the reply is helpful, please Upvote and Accept as answer--