ADSync.exe – Trigger Microsoft Entra Connect Delta Sync Remotely with a Single Click

If you work with hybrid Active Directory environments and Microsoft Entra ID (formerly Azure Active Directory), you probably frequently need to trigger a manual synchronization after creating users, modifying group memberships, or updating Active Directory attributes.

Normally, this requires connecting to the Microsoft Entra Connect server, opening PowerShell, and running:

Start-ADSyncSyncCycle -PolicyType Delta

While this is a simple command, connecting to the server every time can become repetitive, especially if you primarily work from a management server or jump server.

To simplify this process, I have created a small Windows utility called ADSync.exe.

What is ADSync.exe?

ADSync.exe is a lightweight Windows utility that allows you to remotely trigger a Microsoft Entra Connect Delta synchronization by simply double-clicking an executable.

The utility uses PowerShell Remoting to execute the synchronization command directly on your Microsoft Entra Connect server.

There is no need to log on to the synchronization server manually or open a PowerShell console.

Features

  • Trigger Microsoft Entra Connect Delta synchronization with a single click.
  • Execute the synchronization remotely using PowerShell Remoting.
  • Configure the target server using a simple JSON configuration file.
  • Uses the currently logged-in Windows user’s credentials.
  • No passwords stored in configuration files.
  • Displays the result of the synchronization request.
  • Provides error messages if the remote command fails.
  • No installation required.
  • Source code included.

Download ADSync.exe

Download: ADSync.zip https://kennethdalbjerg.dk/files/download/AdSync/ADSync-Launcher.zip

The package contains the following files:

FileDescription
ADSync.exeThe executable utility
ADSync.config.jsonConfiguration file containing the target server
Source.ps1Original PowerShell source code
README.txtConfiguration and usage instructions

Extract the files to a folder of your choice, for example:

C:\Tools\ADSync\

Configuration

Open the ADSync.config.json file in Notepad or your preferred text editor.

The configuration file looks like this:

{
    "Server": "managementad"
}

Replace managementad with the hostname or fully qualified domain name of your Microsoft Entra Connect server.

For example:

{
    "Server": "ADSYNC01.contoso.local"
}

Make sure that the configuration file is located in the same directory as ADSync.exe.

Requirements

Before using the utility, ensure that the following requirements are met:

  • A 64-bit Windows operating system.
  • Microsoft Entra Connect Sync installed on the target server.
  • PowerShell Remoting enabled on the target server.
  • Network connectivity between your workstation and the synchronization server.
  • The currently logged-in user has sufficient permissions to execute the synchronization command remotely.

Enable PowerShell Remoting

If PowerShell Remoting is not already enabled, run the following command in an elevated PowerShell console on your Microsoft Entra Connect server:

Enable-PSRemoting -Force

You can verify connectivity from your workstation or management server by running:

Test-WSMan ADSYNC01.contoso.local

You can also manually test the synchronization command:

Invoke-Command -ComputerName ADSYNC01.contoso.local -ScriptBlock {
    Import-Module ADSync
    Start-ADSyncSyncCycle -PolicyType Delta
}

If this command works using your current Windows credentials, the utility should work as well.

How to use ADSync.exe

Once the configuration file has been updated, simply double-click ADSync.exe.

The utility will:

  1. Read the target server from the JSON configuration file.
  2. Establish a remote PowerShell connection to the server.
  3. Import the ADSync PowerShell module.
  4. Trigger a Delta synchronization.
  5. Display the result or any error messages.
  6. Wait for you to press Enter before closing the window.

A successful response indicates that Microsoft Entra Connect has accepted the synchronization request. It does not necessarily mean that the entire synchronization process has completed.

How does it work?

Behind the scenes, the utility uses standard PowerShell commands.

The core functionality is based on the following code:

Invoke-Command -ComputerName $Server -ScriptBlock {
    Import-Module ADSync
    Start-ADSyncSyncCycle -PolicyType Delta
}

The executable is essentially a convenient wrapper around PowerShell Remoting, including configuration handling and error reporting.

It does not require an additional service, scheduled task, application registration, or Microsoft Graph API permissions.

Delta synchronization vs. Initial synchronization

Microsoft Entra Connect supports different synchronization cycle types.

Synchronization typeDescription
DeltaProcesses incremental changes since the previous synchronization.
InitialPerforms a full import and synchronization across the configured connectors.

ADSync.exe uses Delta synchronization because this is normally sufficient when creating or modifying users, changing group memberships, or updating Active Directory attributes.

Security considerations

The utility uses your current Windows credentials and does not store usernames or passwords.

It does not bypass Windows security, PowerShell Remoting permissions, or Microsoft Entra Connect permissions.

I recommend using an appropriately delegated administrative account and restricting PowerShell Remoting access to authorized management workstations and servers.

The executable is currently not digitally signed, so Windows SmartScreen or endpoint protection software may display a warning. The original PowerShell source code is included for transparency and review.

The utility is provided as-is. Always test it in your own environment before using it in production.

Final thoughts

Sometimes the smallest tools make the biggest difference in everyday IT administration.

I created ADSync.exe because I frequently work from management and jump servers and wanted a quick way to trigger Microsoft Entra Connect synchronization without having to connect to the synchronization server manually.

Instead of opening a remote desktop session or typing the same PowerShell commands repeatedly, I can now simply double-click an executable on my desktop.

Hopefully, this small utility will also save you some time.

Feel free to download, review, and adapt the included source code to your own environment.

Leave a Reply

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