Don't throw error if only 1 PF mailbox in the environment#2516
Open
dpaulson45 wants to merge 1 commit intomainfrom
Open
Don't throw error if only 1 PF mailbox in the environment#2516dpaulson45 wants to merge 1 commit intomainfrom
dpaulson45 wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts HealthChecker’s “Root Public Folder Mailbox Serving Hierarchy” finding to avoid flagging an error when only a single Public Folder mailbox exists, reducing noise for small/valid single-PF-mailbox environments.
Changes:
- Collects a new boolean (
MultiplePublicFolderMailboxes) during org data collection by quickly checking whether more than one PF mailbox exists. - Updates the analyzer to only raise the “Root Public Folder Mailbox Serving Hierarchy” error when multiple PF mailboxes exist and the root PF mailbox is not excluded from serving hierarchy.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Diagnostics/HealthChecker/DataCollection/OrganizationInformation/Invoke-JobOrganizationInformation.ps1 | Adds a second PF mailbox query (ResultSize 2) and stores a MultiplePublicFolderMailboxes flag on the collected root PF mailbox object. |
| Diagnostics/HealthChecker/Analyzer/Invoke-AnalyzerFrequentConfigurationIssues.ps1 | Gates the existing “Root Public Folder Mailbox Serving Hierarchy” error condition on MultiplePublicFolderMailboxes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/HealthChecker/DataCollection/OrganizationInformation/Invoke-JobOrganizationInformation.ps1
Show resolved
Hide resolved
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
When there is only 1 Public Folder mailbox in the environment, we throw an error stating that this is bad. Which technically it is, but not an issue that needs to be addressed if the mailbox is small enough.
Reason:
Requested by a customer who has this setup.
Fix:
Run
Get-Mailbox -PublicFolderagain to see if there are multiple PF mailboxes. If there are, and the Root PF Mailbox is not excluded from serving the hierarchy, then show the error message.Resolved #2478
Validation:
Pester tested