We have all been here. It’s a common issue really and one that doesn’t have a simple “one-click” solution within Endpoint Manager.
So what you gonna do? It’s a simple solution really. Grab all of the devices from Azure and loop through them calling the Invoke-IntuneManagedDeviceSyncDevice cmdlet. This will only work for devices that are online at the time the invoke command is executed but sometimes this is the solution that’s needed.
ScriptCentral/Sync-AllDevices.ps1 at master · leeburridge/ScriptCentral (github.com)$Devices = Get-IntuneManagedDevice -Filter "contains(operatingsystem, 'Windows')" | Get-MSGraphAllPages Foreach ($Device in $Devices) { Invoke-IntuneManagedDeviceSyncDevice -managedDeviceId $Device.managedDeviceId Write-Host "Sending Sync request to Device with DeviceID $($Device.managedDeviceId)" -ForegroundColor Yellow }
Simple stuff. You could even run this as a scheduled task if you wanted devices to sync more often than the 8 hours that MS have by default…
Is this a Powershell that you run from an admin computer where install-module and/or import-module are needed?
Thanks!
Hi Jay,
This is the worst part of powershell imo lol. Finding the module.
Microsoft.Graph.Intune
This is probably the module you need to import/install for the gallery.