Skip to content

Commit

Permalink
Do not use conflicting variable name in agent for windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Sep 8, 2024
1 parent cf8c1c3 commit 1b5d5bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions other/agent_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ STIGTest'
Write-Host "Command Output: $result"
}

$audit = Import-Clixml -Path "$result"
$audit.Compliance[0].ResourcesInDesiredState | ForEach {
$auditc = Import-Clixml -Path "$result"
$auditc.Compliance[0].ResourcesInDesiredState | ForEach {
$item = @{}
$item.result = "pass"
$external_ident = $_.InstanceName.Split("]")
Expand All @@ -335,7 +335,7 @@ STIGTest'
}
Clear-Variable -name item
}
$audit.Compliance[0].ResourcesNotInDesiredState | ForEach {
$auditc.Compliance[0].ResourcesNotInDesiredState | ForEach {
$item = @{}
$item.result = "fail"
$external_ident = $_.InstanceName.Split("]")
Expand Down

0 comments on commit 1b5d5bc

Please sign in to comment.