Skip to content

Commit f59349b

Browse files
committed
switch to test-json for converting field values
1 parent 663f159 commit f59349b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/CIPPCore/Public/Functions/Get-CIPPTenantAlignment.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function Get-CIPPTenantAlignment {
7171
# Process field value
7272
if ($FieldValue -is [System.Boolean]) {
7373
$FieldValue = [bool]$FieldValue
74-
} elseif ($FieldValue -like '*{*') {
74+
} elseif (Test-Json -Json $FieldValue -ErrorAction SilentlyContinue) {
7575
try {
7676
$FieldValue = ConvertFrom-Json -Depth 100 -InputObject $FieldValue -ErrorAction Stop
7777
} catch {

0 commit comments

Comments
 (0)