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 + 아르 자형 (Run Dialog): powershell.exe;
- 딸깍 하는 소리 Start Menu 유형 파워셸, 그리고 그것을 실행;
- 마우스 오른쪽 버튼 클릭 Start Menu 그리고를 클릭하세요 윈도우 파워셸 (관리자).
메모: 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 – run Delta Sync.
Invoke-Command -ComputerName [ServerWithAzureADConnect] -ScriptBlock
{
Import-Module adsync
Start-ADSyncSyncCycle -PolicyType Delta
}