Skip to content

cyberhamza/Invoke-IntuneDeviceSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Invoke-IntuneDeviceSync

Overview

PowerShell script to force Microsoft Intune sync on all managed devices or filtered by OS type via Microsoft Graph API.

Problem It Solves

In enterprise environments, devices sometimes go out of sync with Intune policies. This script forces an immediate sync across all managed devices without waiting for the default sync interval.

Features

  • Sync all devices or filter by OS (Windows, iOS, Android, macOS)
  • Real-time progress bar during sync
  • Exports detailed sync log to CSV with timestamps
  • Error handling for failed devices
  • Auto-installs required Microsoft Graph modules

Requirements

  • PowerShell 5.1 or later
  • Microsoft Graph PowerShell module (auto-installed)
  • Intune Administrator or Global Administrator role

Usage

# Sync all devices
.\Invoke-IntuneDeviceSync.ps1

# Sync Windows devices only
.\Invoke-IntuneDeviceSync.ps1 -DeviceOS Windows

# Sync iOS devices with custom log path
.\Invoke-IntuneDeviceSync.ps1 -DeviceOS iOS -LogPath "C:\Reports\sync.csv"

Output

  • CSV log file with device name, sync status, timestamp, and errors
  • Console summary showing total synced, successful, and failed

Author

Hamza Ali — IT Cybersecurity Engineer | Dubai, UAE

About

Forces sync on all or filtered devices

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors