Answer the question
In order to leave comments, you need to log in
How to delete all emails in Exchange?
Good afternoon! Please tell me how you can delete all letters on the server with one command and the letters of an individual user.
It is necessary to delete all letters and calendars on the user's mail server. Without the possibility of recovery. In fact, you need to clear the entire server from letters.
Answer the question
In order to leave comments, you need to log in
Once and forever:
Get-MailboxDatabase | Dismount-Database
Get-MailboxDatabase | Remove-MailboxDatabase -Confirm:$false
I found a command to delete all letters, but is it possible to use a cycle with received addresses and file a delete cycle
1. Variable to receive all mailboxes
$address = Get-MailBox | select -Expand EmailAddresses | % {$_.SmtpAddress}
Search-Mailbox -Identity почтовый_адрес -SearchQuery "Kind:Email" -DeleteContent
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question