mirror of
https://github.com/Micke-K/IntuneManagement.git
synced 2026-11-27 09:22:26 +01:00
Development snapshot 2026-10-25 (4.0.0-beta1 + fixes)
This commit is contained in:
@@ -149,6 +149,14 @@ function Merge-PolicyHydrateBody
|
||||
}
|
||||
|
||||
foreach($prop in $Body.PSObject.Properties) {
|
||||
# An EMPTY assignments array from the re-read does not replace loaded
|
||||
# assignments: some endpoints answer the single-object $expand with []
|
||||
# while the list $expand and /assignments return the rows (Compliance
|
||||
# Policy V2, measured live 2026-10-17). Exports then lost them.
|
||||
if($prop.Name -eq 'assignments' -and @($prop.Value).Count -eq 0 -and
|
||||
$Policy.JsonObject.PSObject.Properties['assignments'] -and @($Policy.JsonObject.assignments).Count -gt 0) {
|
||||
continue
|
||||
}
|
||||
if($Policy.JsonObject.PSObject.Properties[$prop.Name]) {
|
||||
$Policy.JsonObject.($prop.Name) = $prop.Value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user