$table = New-Object System.Data.DataTable
$table.Columns.Add("Name", "System.String")
$table.Columns.add("Archive_Size", "System.String")
$table.Columns.add("Archive_Quoted", "System.String")
$table.Columns.add("AutoExpand", "System.String")
Foreach ($i in (Get-Mailbox -Archive | sort Name)) {
$archive = $i | Get-MailboxStatistics -Archive
$row = $table.NewRow()
$row.Name = $i.Name
$row.Archive_Quoted = $i.ArchiveQuota
$row.Archive_Size = $archive.TotalItemSize
$row.AutoExpand = $i.AutoExpandingArchiveEnabled
$table.rows.add($row)
}
cls
$table | Format-Table
If you believe the possibility exists then you should seek it out. Keep moving, whatever it takes. Even if the way ahead lies through a river of mud.
Wednesday, 3 August 2022
PowerShell Exchange 365 Output Archive sizes and Quota
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment