Safely decommission on-premises Active Directory infrastructure after confirming successful migration and stable operations.
Validate complete migration before decommissioning:
# Verify all users are synchronized and active in Entra ID
Connect-MgGraph -Scopes "User.Read.All"
$cloudUsers = Get-MgUser -All | Where-Object {$_.OnPremisesSyncEnabled -eq $true}
Write-Output "Synchronized users: $($cloudUsers.Count)"
# Check for any remaining on-premises dependencies
Get-MgApplication -All | Where-Object {$_.OnPremisesPublishing -ne $null}
Disable directory synchronization (final step):
# Connect to Microsoft Online Services
Connect-MsolService
# Disable directory synchronization (irreversible action)
Set-MsolDirSyncEnabled -EnableDirSync $false
# Confirm synchronization is disabled
Get-MsolCompanyInformation | Select-Object DirectorySynchronizationEnabled
Clean up on-premises infrastructure:
- Uninstall Microsoft Entra Connect or Cloud Sync agents
- Remove service accounts created for synchronization
- Update DNS records to remove on-premises references
- Archive Active Directory database for compliance retention
- Decommission domain controllers (keep one for 90 days as backup)
Update documentation and runbooks:
- Update network diagrams to reflect cloud-only architecture
- Modify incident response procedures for cloud-based identity
- Train helpdesk staff on Microsoft Entra ID administration
- Update backup and disaster recovery procedures
Configure cloud-only administrative processes:
# Set up cloud-only user provisioning workflow
$workflow = @{
"displayName" = "New User Onboarding"
"description" = "Automated user provisioning for new employees"
"isEnabled" = $true
"category" = "joiner"
}
# Create lifecycle workflow (requires Entra ID Governance license)
New-MgIdentityGovernanceLifecycleWorkflow -BodyParameter $workflow
Pro tip: Keep a read-only domain controller in archive mode for 90 days after disabling sync, in case you need to reference historical data or perform emergency rollback.
Verification: Confirm directory synchronization shows as "Disabled" in Microsoft Entra admin center > Hybrid identity. Test all critical business applications and user scenarios work without on-premises AD dependency.