Cannot find Search-Mailbox
Before you can use the cmdlet Search-Mailbox you need to load the Snap In for this. Otherwise the error above is displayed and the cmdlet is not found.
Add Snap In
Load the Snap In with the cmdlet Add-PSSnapin Microsoft.Exchange.Management.Powershell.E2010
Search-Mailbox
You can then use the cmdlet Search-Mailbox to find a mailbox and then choose the parameter DeleteContent to empty the mailbox.
Search-Mailbox -Identity "user@domain.com" -DeleteContent
This will not delete any folders in a mailbox these must be deleted manually.
No comments:
Post a Comment