|
4 | 4 | . $PSScriptRoot\Add-AnalyzedResultInformation.ps1
|
5 | 5 | . $PSScriptRoot\Get-DisplayResultsGroupingKey.ps1
|
6 | 6 | . $PSScriptRoot\Invoke-AnalyzerKnownBuildIssues.ps1
|
| 7 | +. $PSScriptRoot\..\..\..\Shared\CompareExchangeBuildLevel.ps1 |
7 | 8 | function Invoke-AnalyzerExchangeInformation {
|
8 | 9 | [CmdletBinding()]
|
9 | 10 | param(
|
@@ -581,6 +582,89 @@ function Invoke-AnalyzerExchangeInformation {
|
581 | 582 | }
|
582 | 583 | }
|
583 | 584 |
|
| 585 | + if ((Test-ExchangeBuildGreaterOrEqualThanBuild -CurrentExchangeBuild $exchangeInformation.BuildInformation.VersionInformation -Version "Exchange2019" -CU "CU15") -and |
| 586 | + $exchangeInformation.GetExchangeServer.IsEdgeServer -eq $false) { |
| 587 | + # This feature only needs to be displayed if we are on Exchange 2019 CU15+ |
| 588 | + if ($null -eq $exchangeInformation.GetExchangeServer.RingLevel) { |
| 589 | + $params = $baseParams + @{ |
| 590 | + Name = "Feature Flighting" |
| 591 | + Details = "Unknown - No data on Get-ExchangeServer related to this feature. Likely due to connecting to an Exchange Server for shell not on supported build." |
| 592 | + DisplayWriteType = "Yellow" |
| 593 | + } |
| 594 | + Add-AnalyzedResultInformation @params |
| 595 | + } else { |
| 596 | + Add-AnalyzedResultInformation @baseParams -Name "Feature Flighting" |
| 597 | + |
| 598 | + $getExchangeServer = $exchangeInformation.GetExchangeServer |
| 599 | + $flightingBaseParams = $baseParams + @{ DisplayCustomTabNumber = 2 } |
| 600 | + $params = $flightingBaseParams + @{ |
| 601 | + Name = "Ring Level" |
| 602 | + Details = $getExchangeServer.RingLevel |
| 603 | + } |
| 604 | + Add-AnalyzedResultInformation @params |
| 605 | + |
| 606 | + $endpointDisplayWriteType = "Grey" |
| 607 | + $endpointDetails = "200 - Reachable" |
| 608 | + if ($exchangeInformation.ExchangeFeatureFlightingServiceResult.StatusCode -ne 200) { |
| 609 | + $endpointDisplayWriteType = "Yellow" |
| 610 | + $endpointDetails = "Unreachable - More Information: https://aka.ms/HC-ExchangeServerFeatureFlighting" |
| 611 | + } |
| 612 | + $params = $flightingBaseParams + @{ |
| 613 | + Name = "Endpoint Service Status" |
| 614 | + Details = $endpointDetails |
| 615 | + DisplayWriteType = $endpointDisplayWriteType |
| 616 | + } |
| 617 | + Add-AnalyzedResultInformation @params |
| 618 | + |
| 619 | + $params = $flightingBaseParams + @{ |
| 620 | + Name = "Last Service Run Time" |
| 621 | + Details = $getExchangeServer.LastFlightingServiceRunTime |
| 622 | + } |
| 623 | + Add-AnalyzedResultInformation @params |
| 624 | + |
| 625 | + if ($getExchangeServer.FeaturesEnabled.Count -gt 0) { |
| 626 | + $details = ([string]::Join(", ", $getExchangeServer.FeaturesEnabled)) |
| 627 | + } else { |
| 628 | + $details = "None Enabled" |
| 629 | + } |
| 630 | + $params = $flightingBaseParams + @{ |
| 631 | + Name = "Features Enabled" |
| 632 | + Details = $details |
| 633 | + } |
| 634 | + Add-AnalyzedResultInformation @params |
| 635 | + |
| 636 | + # The rest of the settings, only display if we have something there. |
| 637 | + if ($getExchangeServer.FeaturesApproved.Count -gt 0) { |
| 638 | + $params = $flightingBaseParams + @{ |
| 639 | + Name = "Features Approved" |
| 640 | + Details = ([string]::Join(", ", $getExchangeServer.FeaturesApproved)) |
| 641 | + } |
| 642 | + Add-AnalyzedResultInformation @params |
| 643 | + } |
| 644 | + if ($getExchangeServer.FeaturesAwaitingAdminApproval.Count -gt 0) { |
| 645 | + $params = $flightingBaseParams + @{ |
| 646 | + Name = "Features Awaiting Admin Approval" |
| 647 | + Details = ([string]::Join(", ", $getExchangeServer.FeaturesAwaitingAdminApproval)) |
| 648 | + } |
| 649 | + Add-AnalyzedResultInformation @params |
| 650 | + } |
| 651 | + if ($getExchangeServer.FeaturesBlocked.Count -gt 0) { |
| 652 | + $params = $flightingBaseParams + @{ |
| 653 | + Name = "Features Blocked" |
| 654 | + Details = ([string]::Join(", ", $getExchangeServer.FeaturesBlocked)) |
| 655 | + } |
| 656 | + Add-AnalyzedResultInformation @params |
| 657 | + } |
| 658 | + if ($getExchangeServer.FeaturesDisabled.Count -gt 0) { |
| 659 | + $params = $flightingBaseParams + @{ |
| 660 | + Name = "Features Disabled" |
| 661 | + Details = ([string]::Join(", ", $getExchangeServer.FeaturesDisabled)) |
| 662 | + } |
| 663 | + Add-AnalyzedResultInformation @params |
| 664 | + } |
| 665 | + } |
| 666 | + } |
| 667 | + |
584 | 668 | if ($null -ne $exchangeInformation.SettingOverrides) {
|
585 | 669 |
|
586 | 670 | $overridesDetected = $null -ne $exchangeInformation.SettingOverrides.SettingOverrides
|
|
0 commit comments