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.

Related Resources

A New Cayosoft.com

We’re excited to announce the new Cayosoft.com! This new and improved site was a true team effort by many at Cayosoft. After seven years it was time to retire our old

Read More »

2020: A Year in Review

  Wow, 2020 — A year to remember, to say the least!   Despite a global pandemic, so much was accomplished at Cayosoft and across the tech community.  People

Read More »