Skip to content

Don't throw error if only 1 PF mailbox in the environment#2516

Open
dpaulson45 wants to merge 1 commit intomainfrom
dpaul-Hc1PF
Open

Don't throw error if only 1 PF mailbox in the environment#2516
dpaulson45 wants to merge 1 commit intomainfrom
dpaul-Hc1PF

Conversation

@dpaulson45
Copy link
Member

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 -PublicFolder again 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

@dpaulson45 dpaulson45 requested a review from a team as a code owner March 6, 2026 21:50
@dpaulson45 dpaulson45 added Enhancement New feature or request Health Checker labels Mar 6, 2026
@dpaulson45 dpaulson45 requested a review from Copilot March 6, 2026 21:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dpaulson45
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Health Checker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue] - Health Checker Update PF Mailbox present in organization when only 1 created

2 participants