Skip to content

Commit

Permalink
Merge pull request #1805 from microsoft/main
Browse files Browse the repository at this point in the history
Release v2 8-10-23
  • Loading branch information
dpaulson45 authored Aug 10, 2023
2 parents fe9c131 + 2611383 commit 0e0aeec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Shared/Confirm-ExchangeShell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ function Confirm-ExchangeShell {

try {
$currentErrors = $Error.Count
$eventLogLevel = Get-EventLogLevel -ErrorAction Stop | Select-Object -First 1
$attempts = 0
do {
$eventLogLevel = Get-EventLogLevel -ErrorAction Stop | Select-Object -First 1
$attempts++
if ($attempts -ge 5) {
throw "Failed to run Get-EventLogLevel too many times."
}
} while ($null -eq $eventLogLevel)
$getEventLogLevelCallSuccessful = $true
foreach ($e in $eventLogLevel) {
Write-Verbose "Type is: $($e.GetType().Name) BaseType is: $($e.GetType().BaseType)"
Expand Down

0 comments on commit 0e0aeec

Please sign in to comment.