Skip to content

Commit

Permalink
Added error handing to Test-Path
Browse files Browse the repository at this point in the history
  • Loading branch information
HotCakeX committed Jan 17, 2024
1 parent 35a58c9 commit 1056533
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ Function Protect-WindowsSecurity {
'Import-Module:Verbose' = $false
'Copy-Item:Force' = $true
'Copy-Item:ProgressAction' = 'SilentlyContinue'
'Test-Path:ErrorAction' = 'SilentlyContinue'
}
}

Expand Down
1 change: 1 addition & 0 deletions Harden-Windows-Security.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ Function Protect-WindowsSecurity {
'Import-Module:Verbose' = $false
'Copy-Item:Force' = $true
'Copy-Item:ProgressAction' = 'SilentlyContinue'
'Test-Path:ErrorAction' = 'SilentlyContinue'
}
}

Expand Down

0 comments on commit 1056533

Please sign in to comment.