Skip to content
프로젝트

jseerden/IntuneBackupAndRestore

GitHub에서 보기

소개

Microsoft Graph를 조회하고 테넌트 간 Intune 구성을 백업 및 복원할 수 있는 PowerShell 모듈입니다.

시스템 및 인프라

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Intune Backup & Restore

PowerShell Gallery PowerShell Gallery

This PowerShell Module queries Microsoft Graph, and allows for cross-tenant Backup & Restore actions of your Intune Configuration.

Intune Configuration is backed up as (json) files in a given directory.

Credits

Thanks https://github.com/mhu4711 for updating this PowerShell module to the Microsoft.Graph PowerShell module.

Installing IntuneBackupAndRestore

# Install IntuneBackupAndRestore from the PowerShell Gallery
Install-Module -Name IntuneBackupAndRestore

Updating IntuneBackupAndRestore

# Update IntuneBackupAndRestore from the PowerShell Gallery
Update-Module -Name IntuneBackupAndRestore

Prerequisites

  • Requires Microsoft.Graph PowerShell Module (Install-Module -Name Microsoft.Graph, Install-Module Microsoft.Graph.Beta -AllowClobber)
  • Make sure to import the IntuneBackupAndRestore PowerShell module before using it with the Import-Module IntuneBackupAndRestore cmdlet.

Features

Backup actions

  • Administrative Templates (Device Configurations)
  • Administrative Template Assignments
  • App Protection Policies
  • App Protection Policy Assignments
  • Autopilot Deployment Profiles
  • Autopilot Deployment Profile Assignments
  • Client Apps
  • Client App Assignments
  • Device Compliance Policies
  • Device Compliance Policy Assignments
  • Device Configurations
  • Device Configuration Assignments
  • Device Management Scripts (Device Configuration -> PowerShell Scripts)
  • Device Management Script Assignments
  • Proactive Remediations
  • Proactive Remediation Assignments
  • Settings Catalog Policies
  • Settings Catalog Policy Assignments
  • Software Update Rings
  • Software Update Ring Assignments
  • Endpoint Security Configurations
    • Security Baselines
      • Windows 10 Security Baselines
      • Microsoft Defender ATP Baselines
      • Microsoft Edge Baseline
    • Antivirus
    • Disk encryption
    • Firewall
    • Endpoint detection and response
    • Attack surface reduction
    • Account protection
    • Device compliance

Restore actions

  • Administrative Templates (Device Configurations)
  • Administrative Template Assignments
  • App Protection Policies
  • App Protection Policy Assignments
  • Autopilot Deployment Profiles
  • Autopilot Deployment Profile Assignments
  • Client App Assignments
  • Device Compliance Policies
  • Device Compliance Policy Assignments
  • Device Configurations
  • Device Configuration Assignments
  • Device Management Scripts (Device Configuration -> PowerShell Scripts)
  • Device Management Script Assignments
  • Proactive Remediations
  • Proactive Remediation Assignments
  • Settings Catalog Policies
  • Settings Catalog Policy Assignments
  • Software Update Rings
  • Software Update Ring Assignments
  • Endpoint Security Configurations
    • Security Baselines
      • Windows 10 Security Baselines
      • Microsoft Defender ATP Baselines
      • Microsoft Edge Baseline
    • Antivirus
    • Disk encryption
    • Firewall
    • Endpoint detection and response
    • Attack surface reduction
    • Account protection
    • Device compliance

Please note that some Client App settings can be backed up, for instance the retrieval of Win32 (un)install cmdlets, requirements, etcetera. The Client App itself is not backed up and this module does not support restoring Client Apps at this time.

Examples

Example 01 - Full Intune Backup

Start-IntuneBackup -Path C:\temp\IntuneBackup

Example 02 - Full Intune Restore

Start-IntuneRestoreConfig -Path C:\temp\IntuneBackup
Start-IntuneRestoreAssignments -Path C:\temp\IntuneBackup

Example 03 - Restore Intune Assignments

If configurations have been restored:

Start-IntuneRestoreAssignments -Path C:\temp\IntuneBackup

If reassigning assignments to existing (non-restored) configurations. In this case the assignments match the configuration id to restore to.
This allows for restoring if display names have changed.

Start-IntuneRestoreAssignments -Path C:\temp\IntuneBackup -RestoreById $true

Example 04 - Restore only Intune Compliance Policies

Invoke-IntuneRestoreDeviceCompliancePolicy -Path C:\temp\IntuneBackup
Invoke-IntuneRestoreDeviceCompliancePolicyAssignment -Path C:\temp\IntuneBackup

Example 05 - Restore Only Intune Device Configurations

Invoke-IntuneRestoreDeviceConfiguration -Path C:\temp\IntuneBackup
Invoke-IntuneRestoreDeviceConfigurationAssignment -Path C:\temp\IntuneBackup

Example 06 - Backup Only Intune Endpoint Security Configurations

Invoke-IntuneBackupDeviceManagementIntent -Path C:\temp\IntuneBackup

Example 07 - Restore Only Intune Endpoint Security Configurations

Invoke-IntuneRestoreDeviceManagementIntent -Path C:\temp\IntuneBackup

Example 08 - Compare two Backup Files for changes

# The DifferenceFilePath should point to the latest Intune Backup file, as it might contain new properties.
Compare-IntuneBackupFile -ReferenceFilePath 'C:\temp\IntuneBackup\Device Configurations\Windows - Endpoint Protection.json' -DifferenceFilePath 'C:\temp\IntuneBackupLatest\Device Configurations\Windows - Endpoint Protection.json'

Example 09 - Compare all files in two Backup Directories for changes

# The DifferenceFilePath should point to the latest Intune Backup file, as it might contain new properties.
Compare-IntuneBackupDirectories -ReferenceDirectory 'C:\temp\IntuneBackup' -DifferenceDirectory 'C:\temp\IntuneBackup2'

Known Issues

  • Does not support backing up Intune configuration items with duplicate Display Names. Files may be overwritten.

관련 프로젝트 살펴보기

불러오는 중…