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.

New Survey Finds...

Active Directory forest recovery not taken serious enough. See what else your peers had to say.