| Kategorie |
Benutzer |
| Beschreibung |
Exportiert alle Exchange Online Postfächer mit ihrer aktuellen Größe als CSV. |
Connect-ExchangeOnline -UserPrincipalName "admin@{{TENANT_DOMAIN}}"
$mailboxes = Get-Mailbox -ResultSize Unlimited
$result = foreach ($mb in $mailboxes) {
$stats = Get-MailboxStatistics -Identity $mb.UserPrincipalName
[PSCustomObject]@{
Name = $mb.DisplayName
UPN = $mb.UserPrincipalName
Groesse_MB = [math]::Round($stats.TotalItemSize.Value.ToMB(), 2)
Anzahl_Elemente = $stats.ItemCount
}
}
$result | Export-Csv -Path ".\postfach-groessen.csv" -NoTypeInformation -Encoding UTF8
Write-Host "Export abgeschlossen: postfach-groessen.csv"