Policies: ADMX-Import-Diagnose bei Presentation-Mismatch verbessert
Die "nicht zuordenbar"-Meldung listet jetzt Quell- und Ziel-Presentations (Typ + Label) auf, damit echte ADMX-Versionsunterschiede sofort sichtbar sind. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+9
-3
@@ -598,6 +598,7 @@ function Import-GraphAdministrativeTemplate {
|
||||
$presVals = @()
|
||||
$typeCounter = @{}
|
||||
$presFailed = $false
|
||||
$presDiag = ''
|
||||
foreach ($pv in @(Get-PolicyProp $dv 'presentationValues')) {
|
||||
if (-not $pv) { continue }
|
||||
$pres = Get-PolicyProp $pv 'presentation'
|
||||
@@ -605,8 +606,13 @@ function Import-GraphAdministrativeTemplate {
|
||||
$presId = Resolve-TargetPresentationId -TargetPres $tgtPres -SrcPresentation $pres -Counter $typeCounter
|
||||
# Presentation nicht zuordenbar (andere ADMX-Version im Ziel): die GANZE
|
||||
# Einstellung ueberspringen, statt mit unvollstaendigem Body ein 400 zu
|
||||
# provozieren.
|
||||
if (-not $presId) { $presFailed = $true; break }
|
||||
# provozieren. Zur Diagnose Quelle + Ziel-Presentations anhaengen.
|
||||
if (-not $presId) {
|
||||
$srcI = "$([string](Get-PolicyProp $pres '@odata.type'))|label='$([string](Get-PolicyProp $pres 'label'))'"
|
||||
$tgtI = (@($tgtPres) | ForEach-Object { "$([string](Get-PolicyProp $_ '@odata.type'))|label='$([string](Get-PolicyProp $_ 'label'))'" }) -join ' ; '
|
||||
$presDiag = "Quelle[$srcI] Ziel[$tgtI]"
|
||||
$presFailed = $true; break
|
||||
}
|
||||
} else {
|
||||
$presId = [string](Get-PolicyProp $pres 'id')
|
||||
}
|
||||
@@ -622,7 +628,7 @@ function Import-GraphAdministrativeTemplate {
|
||||
$presVals += $entry
|
||||
}
|
||||
if ($presFailed) {
|
||||
$errors += "${defName}: Eingabefelder passen nicht zur Ziel-ADMX (andere Version?) - uebersprungen"
|
||||
$errors += "${defName}: Presentation nicht zuordenbar - uebersprungen. $presDiag"
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user