Let’s say you want to push an important change as-soon-as-possible… If you have worked with Microsoft EndPoint Configuration Manager (MECM) you are well aware of the possibility to initiate a machine policy sync to receive the latest changes, but with MEM we do not have the option to do that on bulk devices…
This tool will use the MSGraph PowerShell module to initiate a device sync on either multiple or a single device!
Let’s rock enroll!
Pre-requisites
Let’s start off by installing the Microsoft.Graph.Intune PowerShell module.
More info on the module is found here: microsoft/Intune-PowerShell-SDK: Native PowerShell support for invoking Microsoft Intune Graph API to enable IT Pro scenario automation. (github.com)
- Run: PowerShell as admin
- Run: Install-Module Microsoft.Graph.Intune
- Accept by pressing Y and Enter
- If prompted again, press A and Enter
- Run: Import-Module Microsoft.Graph.Intune
- Run: Get-Module -Name *
- Make sure that Microsoft.Graph.Intune is in the list
- Now we must give MSGraph our consent to connect to our tenant
- Run: Connect-MSGraph -AdminConsent
- Sign in with an admin account and accept
Download the Intune Device Sync Tool
Let’s download the tool from GitHub ⭐
❗ You may need to approve the tool in MDAC/AppLocker or any ASR-rules – the source code is found on GitHub.
- Navigate to GitHub: NicklasAhlberg/Microsoft-Endpoint-Manager (github.com)
- Click: MEM-Device-Sync-Tool
- Click: MEM-Device-Sync-Tool.zip
- Click: Download
- Extract the zip-file and run the tool
- Click: Connect
- Sign in (note that you will need the Intune Administrator role)
- To sync devices in bulk: Click the corresponding logo
- To sync a single device: Click the checkbox and write the device name in the text box
- Click: sync when you are ready
- Done!
New features will be added over time and hope to get a lot of feedback from ya’all to make the tool as good as it possibly could be.