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.
- $credential = Get-Credential
- Import-Module MsOnline
- Connect-MsolService -Credential $credential
- 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.