@@ -35,8 +35,8 @@ function Get-CIPPDrift {
3535 $RawIntuneTemplates = (Get-CIPPAzDataTableEntity @IntuneTable - Filter $IntuneFilter )
3636 $AllIntuneTemplates = $RawIntuneTemplates | ForEach-Object {
3737 try {
38- $JSONData = $_.JSON | ConvertFrom-Json - Depth 100 - ErrorAction SilentlyContinue
39- $data = $JSONData.RAWJson | ConvertFrom-Json - Depth 100 - ErrorAction SilentlyContinue
38+ $JSONData = $_.JSON | ConvertFrom-Json - Depth 10 - ErrorAction SilentlyContinue
39+ $data = $JSONData.RAWJson | ConvertFrom-Json - Depth 10 - ErrorAction SilentlyContinue
4040 $data | Add-Member - NotePropertyName ' displayName' - NotePropertyValue $JSONData.Displayname - Force
4141 $data | Add-Member - NotePropertyName ' description' - NotePropertyValue $JSONData.Description - Force
4242 $data | Add-Member - NotePropertyName ' Type' - NotePropertyValue $JSONData.Type - Force
@@ -277,7 +277,7 @@ function Get-CIPPDrift {
277277 standardName = $PolicyKey
278278 standardDisplayName = " Intune - $TenantPolicyName "
279279 expectedValue = ' This policy only exists in the tenant, not in the template.'
280- receivedValue = ( $TenantPolicy.Policy | ConvertTo-Json - Depth 10 - Compress)
280+ receivedValue = $TenantPolicy.Policy
281281 state = ' current'
282282 Status = $Status
283283 }
@@ -307,7 +307,7 @@ function Get-CIPPDrift {
307307 standardName = $PolicyKey
308308 standardDisplayName = " Conditional Access - $ ( $TenantCAPolicy.displayName ) "
309309 expectedValue = ' This policy only exists in the tenant, not in the template.'
310- receivedValue = ( $TenantCAPolicy | ConvertTo-Json - Depth 10 - Compress)
310+ receivedValue = $TenantCAPolicy
311311 state = ' current'
312312 Status = $Status
313313 }
@@ -347,6 +347,7 @@ function Get-CIPPDrift {
347347 deniedDeviations = @ ($DeniedDeviations )
348348 allDeviations = @ ($AllDeviations )
349349 latestDataCollection = $Alignment.LatestDataCollection
350+ driftSettings = $AlignmentData
350351 }
351352
352353 $Results.Add ($Result )
0 commit comments