Force AD Active Directory replication via Powershell or command prompt, force AAD sync

Via Powershell :

(Get-ADDomainController -Filter *).Name | Foreach-Object { repadmin /syncall $_ (Get-ADDomain).DistinguishedName /AdeP }

Via Command Prompt

repadmin /syncall /AdeP

If you now want an immediate sync to Azure Active Directory use this command to force an AAD sync :

Start-ADSyncSyncCycle -PolicyType Delta
Start-ADSyncSyncCycle -PolicyType Initial

Leave a Reply

Your email address will not be published. Required fields are marked *