top of page
Search

(53) Sync all devices in Intune that are "Windows"

  • Writer: Mr B SOE way
    Mr B SOE way
  • Apr 19, 2023
  • 1 min read

I use this daily when doing projects especially if you are doing mass production rollout, instead of waiting for it sync or go through the Intune portal by selecting the lot.


1. Run PowerShell as administrator.


2. Enter the following:


Import-Module -Name Microsoft.Graph.Intune

Connect-MSGraph [You will be prompted to login with your credentials]


3. To sync all devices, enter the following:


$Devices = Get-IntuneManagedDevice -Filter “contains(operatingsystem, ‘Windows’)” | Get-MSGraphAllPages


4. To sync all devices, enter the following:


Foreach ($Device in $Devices)

{

Invoke-IntuneManagedDeviceSyncDevice -managedDeviceId $Device.managedDeviceId

Write-Host "Sending Sync request to Device with DeviceID $($Device.managedDeviceId)" -ForegroundColor Red

}




 
 
 

Comments


bottom of page