CSV – mailboxes.csv
Identity
user1@example.com
user2@example.com
user3@example.com
...
Powershell – ExAbwesenheit.ps
# Pfad zur CSV-Datei
$csvPath = "C:\path\to\mailboxes.csv"
# Nachrichtentext für die automatische Antwort
$Emailbody = "Vielen Dank für Ihre Nachricht. Ich bin derzeit außer Haus und werde Ihre E-Mail nach meiner Rückkehr beantworten."
# CSV-Datei einlesen
$mailboxes = Import-Csv -Path $csvPath
# Schleife durch jedes Postfach in der CSV-Datei
foreach ($mailbox in $mailboxes) {
Set-MailboxAutoReplyConfiguration -Identity $mailbox.Identity -AutoReplyState Enabled `
-InternalMessage $Emailbody -ExternalMessage $Emailbody
}