Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,8 @@ function Invoke-AnalyzerFrequentConfigurationIssues {
$displayWriteType = "Grey"
$details = $false

if ($rootPfMailbox.IsExcludedFromServingHierarchy -ne $true) {
if ($rootPfMailbox.IsExcludedFromServingHierarchy -ne $true -and
$rootPfMailbox.MultiplePublicFolderMailboxes -eq $true) {
$displayWriteType = "Red"
$details = "true - Error"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,15 @@ function Invoke-JobOrganizationInformation {
[string]$guid = $getOrganizationConfig.RootPublicFolderMailbox
Write-Verbose "Trying to collect root public folder mailbox information - $guid"
$getMailboxRootPF = Get-Mailbox -PublicFolder $guid -ErrorAction Stop
$multiplePFMailboxes = @(Get-Mailbox -PublicFolder -ErrorAction Stop -ResultSize 2).Count -gt 1
Write-Verbose "There are $(if ($multiplePFMailboxes) { "multiple" } else { "not multiple" }) public folder mailboxes in the environment."
$rootPublicFolderMailbox = [PSCustomObject]@{
Name = $getMailboxRootPF.Name
ExchangeGuid = $getMailboxRootPF.ExchangeGuid
IsExcludedFromServingHierarchy = $getMailboxRootPF.IsExcludedFromServingHierarchy
IsHierarchyReady = $getMailboxRootPF.IsHierarchyReady
IsHierarchySyncEnabled = $getMailboxRootPF.IsHierarchySyncEnabled
MultiplePublicFolderMailboxes = $multiplePFMailboxes
}
}
} catch {
Expand Down
Loading