Update test.ps1
This commit is contained in:
3
test.ps1
3
test.ps1
@@ -206,7 +206,8 @@ function Invoke-ServiceImagePathAudit {
|
|||||||
# Only "bad" if the exe path contains whitespace and is unquoted (it is)
|
# Only "bad" if the exe path contains whitespace and is unquoted (it is)
|
||||||
if ($exe -match '\s') {
|
if ($exe -match '\s') {
|
||||||
$badKey = "Yes"
|
$badKey = "Yes"
|
||||||
$fixed = '"' + $exe + '"' + ($args ?? '')
|
$fixed = '"' + $exe + '"' + ($(if ($null -ne $args) { $args } else { '' }))
|
||||||
|
#PoSH 7 $fixed = '"' + $exe + '"' + ($args ?? '')
|
||||||
} else {
|
} else {
|
||||||
$badKey = "No"
|
$badKey = "No"
|
||||||
$fixed = "N/A"
|
$fixed = "N/A"
|
||||||
|
|||||||
Reference in New Issue
Block a user