PowerShell to Stop Office 365 Azure AD Connect Synchronized

PowerShell to Stop Office 365 Azure AD Connect Synchronized

The Office 365 Administrative console will not allow you to delete objects that are synchronized with Active Directory.

  1. $credential = Get-Credential
  2. Import-Module MsOnline
  3. Connect-MsolService -Credential $credential
  4. Set-MsolDirSyncEnabled –EnableDirSync $false

After disabling Synchronization you should be able to delete objects. If you are testing and you would like to re-create the accounts after deleting them – you may need to empty the recycle bin so that name conflicts do not occur.

Note: Cayosoft Administrator is the best way to manage the Hybrid Microsoft Enterprise.  For more information see the Cayosoft Administrator Product Page.

Check out these relevant resources.

Cayosoft Closes Breakthrough Year with Triple-Digit Growth

Cayosoft announced extensive company and technology milestones driven by its focus on customer needs and product innovation. Increasingly recognized as the technology driver in AD and Entra ID management and security, Cayosoft has experienced triple-digit growth since its Series A investment in 2024, with 314% quarter over quarter growth in Q4.

Read More »