Azure AD Sync remote script

Azure AD Sync remote script

Use the following script as an easy shortcut on servers to run Azure AD sync or add it to scheduled tasks and have it auto run when new users/groups are created automatically.

Invoke-Command -ComputerName $Serverwithconnectorinstalled -ScriptBlock {
Import-Module adsync
Start-ADSyncSyncCycle -PolicyType Delta
}

Leave a Reply

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