Micke-K / IntuneManagement

Copy, export, import, delete, document and compare policies and profiles in Intune and Azure with PowerShell script and WPF UI. Import ADMX files and registry settings with ADMX ingestion. View and edit PowerShell script.
MIT License
1.14k stars 201 forks source link

Unable to import software update settings #6

Closed durrante closed 3 years ago

durrante commented 4 years ago

Hello,

Appears to be the same issue as previous when importing conifguration items (date \ time), I've followed the fixes docx but the issue persists with the software update configuration items, I assume it's due to the following fields in the SU config json files:

"qualityUpdatesPauseExpiryDateTime": "\/Date(-62135596800000)\/", "featureUpdatesPauseExpiryDateTime": "\/Date(-62135596800000)\/", "qualityUpdatesRollbackStartDateTime": "\/Date(-62135596800000)\/", "featureUpdatesRollbackStartDateTime": "\/Date(-62135596800000)\/",

I have resolved this by updating the ConfigurationItems.psm1 file and adding in the above items into line 217 so the line should read:

Invoke-GraphRequest -Url "/deviceManagement/deviceConfigurations" -Content (ConvertTo-Json ($obj | Select-Object -Property * -ExcludeProperty createdDateTime, lastModifiedDateTime, qualityUpdatesPauseExpiryDateTime, featureUpdatesPauseExpiryDateTime, qualityUpdatesRollbackStartDateTime, featureUpdatesRollbackStartDateTime) -Depth 5) -HttpMethod POST

Hope this helps

Micke-K commented 3 years ago

Fixed in version 2