Skip to main content

Anzeigen aller Mailkonten mit einem bestimmten Customattribute

Um alle Exchangekonten anzuzeigen, welche ein bestimmtes Customattribute haben, folgendes Skript in der Exchange Management Shell ausführen und CUSTOMATTRIBUTE anpassen.


$mailboxes = Get-Mailbox -filter 'customattribute1 -eq "CUSTOMATTRIBUTE"'
$count = $mailboxes.Count
$counter = 1
foreach($mailbox in $mailboxes){
$DisplayName = "$($mailbox.DisplayName)"
$PrimarySmtpAddress = "$($mailbox.PrimarySmtpAddress)"
$samAccountName = "$($mailbox.samAccountName)"
Write-Host "---> " $counter " von " $count " <---"
Write-Host " Display Name = $DisplayName "
Write-Host " E-Mail Address = $PrimarySmtpAddress "
Write-Host " User Name = $samAccountName "
Write-Host ""
$counter ++
}