Giter Site home page Giter Site logo

whalito / intunebackupandrestore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jseerden/intunebackupandrestore

0.0 1.0 0.0 54 KB

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

License: MIT License

PowerShell 100.00%

intunebackupandrestore's Introduction

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.

Installing IntuneBackupAndRestore

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

Prerequisites

  • Requires AzureAD PowerShell Module (Install-Module -Name AzureAD)
  • Requires MSGraphFunctions PowerShell Module (Install-Module -Name MSGraphFunctions)
  • Connect to Microsoft Graph using the Connect-Graph PSCmdlet first.

Features

Backup actions

  • Administrative Templates (Device Configurations)
  • Administrative Template 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
  • Software Update Rings
  • Software Update Ring Assignments

Restore actions

  • Administrative Templates (Device Configurations)
  • Administrative Template 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
  • Software Update Rings
  • Software Update Ring Assignments

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-IntuneRestoreDeviceCompliancePolicyAssignments -Path C:\temp\IntuneBackup

Example 05 - Restore Only Intune Device Configurations

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

Example 06 - 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'

Known Issues

  • Does not support backing up Intune configuration items with duplicate Display Names. Files may be overwritten.
  • Unable to restore Client App Assignments for Windows Line-of-Business Apps (MSI)

intunebackupandrestore's People

Contributors

jseerden avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.