Skip to content

Commit

Permalink
Merge pull request #2115 from Shanefe/RBA_Update_Check
Browse files Browse the repository at this point in the history
Rba update check
  • Loading branch information
dpaulson45 authored Jul 1, 2024
2 parents a4e399c + 57f2d86 commit 0848d67
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Calendar/Get-RBASummary.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ function RBACriteria {
`t MaximumConflictInstances: $($RbaSettings.MaximumConflictInstances)
`t MaximumConflictPercentage: $($RbaSettings.MaximumConflictPercentage)
`t EnforceSchedulingHorizon: $($RbaSettings.EnforceSchedulingHorizon)
`t SchedulingHorizonInDays: $($RbaSettings.SchedulingHorizonInDays)
"@
Write-Host -NoNewline "`r`nIf all the above criteria are met, the request is "
Write-Host -ForegroundColor Yellow -NoNewline "In-Policy."
Expand Down Expand Up @@ -273,14 +272,23 @@ function RBAProcessingValidation {
}

# Write out a list of Mailboxes
# We get CN from the cmdlet and want Display Name and Primary SMTP Address
function OutputMBList {
param (
[Parameter(Mandatory)]
[string[]]$MBList
)
foreach ($User in $MBList) {
$User = Get-Mailbox -Identity $User
Write-Host " `t `t [$($User.DisplayName)] -- $($User.PrimarySmtpAddress)"
# MS Support will error as we need the Organization to process from CN
$Org = $Identity.Split('@')[1]

if ($null -ne $Org) {
$User = Get-Mailbox -Identity $User -organization $Org
Write-Host " `t `t [$($User.DisplayName)] -- $($User.PrimarySmtpAddress)"
} else {
$User = Get-Mailbox -Identity $User
Write-Host " `t `t [$($User.DisplayName)] -- $($User.PrimarySmtpAddress)"
}
}
}

Expand Down

0 comments on commit 0848d67

Please sign in to comment.