Monday, September 26, 2022

Office 365 and local AD Sync

 1. Run PowerShell


2. Run the following command to install the AzureAD Sync module:

 

[Import-Module ADSync]


{Connect-MsolService -Credential $credential}


3. Next lets review the current intervals AzureAD Connect uses to sync by running the following command.

 

[Get-ADSyncScheduler]


4. Now run the following command to initialize the AzureAD Sync immediately.

 

[Start-ADSyncSyncCycle -PolicyType Delta]


NOTE: This will only sync current changes.  Run the following command to force a complete sync but note that the length of sync time would be greatly increased.

 

[Start-ADSyncSyncCycle -PolicyType Initial]