Export & import your Intune tenant settings

If you’ve ever run into the need to change tenants (maybe your tenant trial has ended or you want to move settings from development to production), you may have noticed that there is no quick way to export settings from Intune. In this step-by-step post, we’ll go over using PowerShell to easily migrate settings.

1. Open a new tab and download the latest Intune PowerShell scripts from https://github.com/microsoftgraph/powershell-intune-samples. Save the .zip file into the downloads folder. Right-click on the powershell-intune-samples-master zip file and select Extract all > Extract.

2. Run PowerShell as an Administrator and accept the UAC popup. Run Set-ExecutionPolicy Bypass.

3. Run Install-Module AzureAD. Approve installing the module.

4. Run cd C:\Users\*YourUserAccount*\Downloads\powershell-intune-samples-master\powershell-intune-samples-master\DeviceConfiguration

If you’re looking to export other content from Intune, you would select another folder during this step and run that corresponding PowerShell script. Other options here include Company Portal Branding, Enrollment Restrictions, and Terms and Conditions.

5. Run .\DeviceConfiguration_Export.ps1

6. Sign-in using your Intune administrator account. Select the checkbox to consent on behalf of your organization and click Accept.

8. The next step is to provide the export location. Run C:\Users\*YourUserAccount*\Downloads\powershell-intune-samples-master\powershell-intune-samples-master\DeviceConfiguration

Now all of our settings are exported! We’ll follow the same general process for importing, except specifying the exported JSON file.

9. Run .\DeviceConfiguration_Import_FromJSON.ps1

10. Open the C:\Users\*YourUserAccount*\Downloads\powershell-intune-samples-master\powershell-intune-samples-master\DeviceConfiguration folder. While holding shift, copy as path the configuration profile. Paste into the PowerShell window.

11. Navigate back to the Azure Portal.

12. On the left navigation bar, click All Services > Intune. Click on Device Configuration and verify the profiles are duplicated. Since I reused my same tenant for this demo, I’ll see that the Autopilot Reset profile is duplicated:

You may also like...

3 Responses

  1. sam says:

    IIs there a way to import the MDMMigrationAnalysis.html into Intune once its created to save having to create each setting individually?

  2. loenders nick says:

    Is it also possible with this to set up one tenant perfectly with compliance policies, gpo’s and apps and such and then export it and import it into all my other tenants, so I don’t have to do all the settings everytime again?

Leave a Reply

Your email address will not be published. Required fields are marked *