From da1fef7d743f7f4f3f235654cf188cd0aa7031a7 Mon Sep 17 00:00:00 2001 From: Bill Long Date: Thu, 18 Mar 2021 13:35:51 -0500 Subject: [PATCH] Fix 27065 --- Security/src/Test-ProxyLogon.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Security/src/Test-ProxyLogon.ps1 b/Security/src/Test-ProxyLogon.ps1 index 6027e3b166..43ad8dfdaa 100644 --- a/Security/src/Test-ProxyLogon.ps1 +++ b/Security/src/Test-ProxyLogon.ps1 @@ -216,12 +216,12 @@ begin { if ((Get-ChildItem $files[$i] -ErrorAction SilentlyContinue | Select-String -Pattern "ServerInfo~").Count -gt 0) { - Import-Csv -Path $files[$i] -ErrorAction SilentlyContinue | Where-Object { $_.AnchorMailbox -Like 'ServerInfo~*/*Reset*VirtualDirectory#' -and $_.HttpStatus -eq 200 } | - Select-Object -Property $outProps | - ForEach-Object { + $hits = @(Import-Csv -Path $files[$i] -ErrorAction SilentlyContinue | Where-Object { $_.AnchorMailbox -Like 'ServerInfo~*/*Reset*VirtualDirectory#' -and $_.HttpStatus -eq 200 } | + Select-Object -Property $outProps) + if ($hits.Count -gt 0) { + $hits | ForEach-Object { [Void]$allResults.resetVDirHits.Add( $_ ) } - if ($allResults.resetVDirHits.Count -gt 0) { [Void]$allResults.resetVDirFiles.Add( $files[$i] ) } }