Skip to content

Commit a30f17b

Browse files
authored
Update MFAReportMailboxes.ps1
1 parent 7aeff6b commit a30f17b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

MFAReportMailboxes.ps1

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# MFAReportMailboxes.ps1
22
# List mailboxes and the last time the Mailbox Folder Assistant processed each mailbox
3-
$Mbx = Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited
4-
$Report = @()
3+
# https://github.com/12Knocksinna/Office365itpros/blob/master/MFAReportMailboxes.ps1
4+
$Mbx = Get-ExoMailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited
5+
$Report = [System.Collections.Generic.List[Object]]::new() # Create output file
6+
Write-Host "Fetching details of user mailboxes..."
57
ForEach ($M in $Mbx) {
68
$LastProcessed = $Null
79
Write-Host "Processing" $M.DisplayName
@@ -15,6 +17,7 @@ ForEach ($M in $Mbx) {
1517
User = $M.DisplayName
1618
LastProcessed = $LastProcessed
1719
ItemsDeleted = $ItemsDeleted.Value}
18-
$Report += $ReportLine
20+
$Report.Add($ReportLine)
1921
}
2022
$Report | Select User, LastProcessed, ItemsDeleted
23+
$Report | Out-GridView

0 commit comments

Comments
 (0)