Deleting mails/meetings in a mailbox

Deleting mails/meetings in a mailbox

roualin ex-mgmt-shell1 Deleting mails/meetings in a mailboxWhen you have an application mailbox that automatically send meeting request to people, so many items could be really heavy.

Here is a little tips to delete all previous meeting automatically (due to a scheduled task) :

#Calculating J-1 date
$ddate=get-date -uformat %m/%d/%Y
$ddate=$ddate.AddDays(-1)
#Adding rights on the mailbox (do it Once)
Get-Mailbox “application.mailbox” | Add-MailboxPermission -User $localu -AccessRights Fullaccess -InheritanceType all
#Deleting old meeting/mails
Get-Mailbox “application.mailbox” | Export-Mailbox -EndDate $ddate -DeleteContent

That could be really… really usefull !

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site