jseerden/IntuneBackupAndRestore

Invoke-IntuneRestoreDeviceConfiguration Error

Closed this issue · 3 comments

Hi, there is an error when trying to restore an iOS configuration profile with Invoke-IntuneRestoreDeviceConfiguration cmdlet

`ConvertFrom-Json : Invalid JSON primitive: .
At C:\Program Files\WindowsPowerShell\Modules\IntuneBackupAndRestore\2.0.0\Public\Invoke-IntuneRestoreDeviceConfiguration.ps1:37 char:74
+ ... DisplayName = ($deviceConfigurationContent | ConvertFrom-Json).displa ...
+                                                  ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand

ConvertFrom-Json : Invalid JSON primitive: .
At C:\Program Files\WindowsPowerShell\Modules\IntuneBackupAndRestore\2.0.0\Public\Invoke-IntuneRestoreDeviceConfiguration.ps1:40 char:60
+ ...   $requestBodyObject = $deviceConfigurationContent | ConvertFrom-Json
+                                                          ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand`

It is a iOS Device configuration Profile with the Profile Type "Device restrictions".
It contains the following configuration.

image

Thank you

Have you tried this again recently?

Have you tried this again recently?

Hi, no, I configure the profile manually for now. Would it be suppose to work now?

Hi @AkiraJimbo,

This issue is resolved with version 2.1.1. iOS Device restriction backups created with version 2.1.1 or higher will restore succesfully.