Skip to content

Commit c7836c6

Browse files
string outs instead of converted json objects
1 parent 13841ea commit c7836c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Modules/CIPPCore/Public/Get-CIPPDrift.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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 | Out-String
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 | Out-String
311311
state = 'current'
312312
Status = $Status
313313
}

0 commit comments

Comments
 (0)