During some recent automations I got the question about triggering Intune Management Extension (IME) somehow. The typical action I take in my lab environment is to restart the IME service:
Of course this will re-initialize everything and also start a new Sync, but I thought there must also be a way to accomplish the Sync without the “all or nothing” method.
So, I remembered that a Sync in Company Portal does also trigger IME to start a Sync process. Lets verify this, open Company Portal, click on Settings, and then on the Sync button:
If we look at the IME log files (C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log) closely, you can see the IME receives a signal to start a Sync process:
How do we find the trigger to raise the signal?
A good way to identify for example command line arguments in executables, is to use the strings.exe from Windows Sysinternals. If we look at the documentation about Strings you can find an easy way to search for strings in an executable:
strings * | findstr /i TextToSearchFor
Utilizing this and searching for the keyword “Sync” in the main executable from the IME service Microsoft.Management.Services.IntuneWindowsAgent.exe
should be a way to go:
strings "C:\Program Files (x86)\Microsoft Intune Management Extension\Microsoft.Management.Services.IntuneWindowsAgent.exe" | findstr /i Sync
Et voilà – here we go! You can see a string found in the output:
So give it a try by running it from the user session via the Run dialog:
Monitoring the log file gives us the evidence that the command actually triggered a Sync, it raised the signal to the service:
This gives us a convenient way to start the sync process for the IME just by execution a command. As the command is a URL Moniker we have to call it via the Windows Shell like seen above with the Run dialog [Win] + [R]. If we want to call this from a PowerShell script we can do this by executing this snippet:
$Shell = New-Object -ComObject Shell.Application $Shell.open("intunemanagementextension://syncapp")
I have shown a technique how to find unknown command line arguments, which also might reveal other options like the Moniker Provider we have seen here. This approach can also be used to find install commands/parameters for setup executables for examples. Finally with that approach we have found a way to easily trigger IME Sync process via “intunemanagementextension://syncapp“.