jseerden / IntuneBackupAndRestore

PowerShell Module that queries Microsoft Graph, and allows for cross-tenant Backup & Restore actions of your Intune Configuration.
MIT License
345 stars 102 forks source link

Write error exception restoring device config assignment #59

Open ichill55 opened 2 years ago

ichill55 commented 2 years ago

I backed up entire Intune setup from one tenant, then individually restored specific groups of settings to another tenant I manage. Although a lot of settings restored fine, I had some errors I didn't understand. This is the first:

PS C:\Users\ichil> Invoke-IntuneRestoreDeviceConfigurationAssignment -Path c:\stuff\intunebackup

VERBOSE: Intune data collection policy Intune data collection policy - Failed to restore Device Configuration Assignment(s) Invoke-IntuneRestoreDeviceConfigurationAssignment : Cannot validate argument on parameter 'Url'. The provided URL is not valid - the URL may be a relative URL At line:1 char:2

Action Type Name Path


Restore Device Configuration Assignments Offboard PC Device Configurations\Assignments\Offboard PC.json
Restore Device Configuration Assignments PBC Win 10 device restrictions Device Configurations\Assignments\PBC Win 10 device restrictions.json Restore Device Configuration Assignments PBC Windows 10 – Chrome con... Device Configurations\Assignments\PBC Windows 10 – Chrome configur... VERBOSE: Update policy for Windows 10 devices Update policy for Windows 10 devices - Failed to restore Device Configuration Assignment(s) Invoke-IntuneRestoreDeviceConfigurationAssignment : Cannot validate argument on parameter 'Url'. The provided URL is not valid - the URL may be a relative URL At line:1 char:2

THE JSON FILE

{ "@odata.type": "#microsoft.graph.windowsUpdateForBusinessConfiguration", "id": "12733dec-40fa-4bc9-8071-88ff4747d480", "lastModifiedDateTime": "\/Date(1633605466338)\/", "roleScopeTagIds": [ "0" ], "supportsScopeTags": true, "deviceManagementApplicabilityRuleOsEdition": null, "deviceManagementApplicabilityRuleOsVersion": null, "deviceManagementApplicabilityRuleDeviceMode": null, "createdDateTime": "\/Date(1633595978402)\/", "description": null, "displayName": "Update policy for Windows 10 devices", "version": 2, "deliveryOptimizationMode": "httpWithPeeringNat", "prereleaseFeatures": "userDefined", "automaticUpdateMode": "autoInstallAtMaintenanceTime", "microsoftUpdateServiceAllowed": true, "driversExcluded": false, "qualityUpdatesDeferralPeriodInDays": 0, "featureUpdatesDeferralPeriodInDays": 0, "qualityUpdatesPaused": false, "featureUpdatesPaused": false, "qualityUpdatesPauseExpiryDateTime": "\/Date(-62135596800000)\/", "featureUpdatesPauseExpiryDateTime": "\/Date(-62135596800000)\/", "businessReadyUpdatesOnly": "all", "skipChecksBeforeRestart": false, "updateWeeks": null, "qualityUpdatesPauseStartDate": null, "featureUpdatesPauseStartDate": null, "featureUpdatesRollbackWindowInDays": null, "qualityUpdatesWillBeRolledBack": null, "featureUpdatesWillBeRolledBack": null, "qualityUpdatesRollbackStartDateTime": "\/Date(-62135596800000)\/", "featureUpdatesRollbackStartDateTime": "\/Date(-62135596800000)\/", "engagedRestartDeadlineInDays": null, "engagedRestartSnoozeScheduleInDays": null, "engagedRestartTransitionScheduleInDays": null, "deadlineForFeatureUpdatesInDays": null, "deadlineForQualityUpdatesInDays": null, "deadlineGracePeriodInDays": null, "postponeRebootUntilAfterDeadline": null, "autoRestartNotificationDismissal": "notConfigured", "scheduleRestartWarningInHours": null, "scheduleImminentRestartWarningInMinutes": null, "userPauseAccess": "notConfigured", "userWindowsUpdateScanAccess": "notConfigured", "updateNotificationLevel": "notConfigured", "allowWindows11Upgrade": false, "installationSchedule": { "@odata.type": "#microsoft.graph.windowsUpdateActiveHoursInstall", "activeHoursStart": "06:00:00.0000000", "activeHoursEnd": "22:00:00.0000000" }, "deviceConfigurationId": "12733dec-40fa-4bc9-8071-88ff4747d480", "deviceConfigurationODataType": "microsoft.graph.windowsUpdateForBusinessConfiguration", "windowsUpdateForBusinessConfigurationReferenceUrl": "https://graph.microsoft.com/Beta/deviceManagement/deviceConfigurations/12733dec-40fa-4bc9-8071-88ff4747d480" }