How to Force Azure ad Connect Sync with PowerShell | Step-by-Step Guide Start PowerShell using any of these methods (or any other you may know of):
- WinKey + R (Run Dialog): Powershell.exe;
- Klicken Startmenü Typ Powershell, and run it;
- Rechte Maustaste Klicken Sie auf Startmenü und klicken Sie auf Windows PowerShell (Admin).
NOTIZ: If you’re running PowerShell on the server where Azure ad Connect is running, don’t run the command for remote server connection.
Run the command to connect to the remote server:
Enter-PSSession -ComputerName [SERVERNAME]
Import Azure ad Connect module.
Import-Module ADSync
Run the following command for synchronization.
For a Delta Sync:
Start-ADSyncSyncCycle -PolicyType Delta
For a Full Sync:
Start-ADSyncSyncCycle -PolicyType Initial
If you need Sync some changed attributes or a group membership – laufen Delta Sync.
Invoke-Command -ComputerName [ServerWithAzureADConnect] -ScriptBlock
{
Import-Module adsync
Start-ADSyncSyncCycle -PolicyType Delta
}