diff --git a/test.ps1 b/test.ps1 index f047672..b67a38e 100644 --- a/test.ps1 +++ b/test.ps1 @@ -216,7 +216,8 @@ function Invoke-ServiceImagePathAudit { # Fallback: if we can't confidently isolate an exe, quote the whole string # (better than producing broken quotes) $badKey = "Yes" - $fixed = '"' + $trim.Trim('"') + '"' + $fixed = '"' + $exe + '"' + ($(if ($null -ne $args) { $args } else { '' })) + #PoSH 7 -> $fixed = '"' + $trim.Trim('"') + '"' } $outObj | Add-Member NoteProperty BadKey $badKey -Force