Skip to content

Commit c09e55e

Browse files
committed
the real domain analyser fix
1 parent 85937d8 commit c09e55e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Domain Analyser/Push-DomainAnalyserDomain.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,13 @@ function Push-DomainAnalyserDomain {
310310
$Result.ScorePercentage = [int](($Result.Score / $Result.MaximumScore) * 100)
311311
$Result.ScoreExplanation = ($ScoreExplanation) -join ', '
312312

313-
$DomainObject.DomainAnalyser = (ConvertTo-Json -InputObject $Result -Depth 5 -Compress).ToString()
313+
$Json = (ConvertTo-Json -InputObject $Result -Depth 5 -Compress).ToString()
314+
315+
if ($DomainObject.PSObject.Properties.Name -notcontains 'DomainAnalyser') {
316+
$DomainObject | Add-Member -MemberType NoteProperty -Name DomainAnalyser -Value $Json
317+
} else {
318+
$DomainObject.DomainAnalyser = $Json
319+
}
314320

315321
try {
316322
$DomainTable.Entity = $DomainObject

0 commit comments

Comments
 (0)