Remove all recurring meetings scheduled by terminated user

38,638

Solution 1

Use the EWS Managed API to access the contents of the user's mailbox and delete necessary items. Can be implemented in any .Net language or a PowerShell script.

Solution 2

You cannot do this with the Exchange Management Shell alone, you would have to implement an Exchange Web Services client to do so.

An easier option than creating a new profile and using outlook would definitely be to use Outlook Web App:

  1. Grant operator Full Access on the Mailbox
  2. Operator logs in to http://webmail.company.net/owa/
  3. Change Mailbox by either:

Now the operator can switch to the users calendar and edit appointments without having to create a new profile and launching Outlook

Solution 3

As "jack" suggested in his post, you can look for those items using the Exchange shell command
Search-Mailbox, and then delete them.

You specify a TargetMailbox and TargetFolder, where the items found in each search will be copied. You can also go "-LogLevel full -LogOnly", and only get a CSV file of the results copied there.
You specify your search query with the SearchQuery paramter, and getting this right can be a bit tricky, because the search properties (like subject, from, date) must be given in your locale/language. So on an english system the SearchQuery for calendar items could look like this:

'Kind:meetings AND From:*name* AND Subject:Pizza'

The 'AND' or 'OR' is not locale specific, and you can also use parentheses. I have never found translations for these keywords from Microsoft, maybe someone else knows where to find them.
Once you have verified the SearchQuery is matching what you want, you can add -DeleteContent to delete those items. The full command could look like this:

Search-Mailbox *name* -SearchQuery 'Kind:meetings AND From:*name2* AND Subject:Pizza' -TargetMailbox admin -TargetFolder ExchangeSearches -LogLevel full
Share:
38,638

Related videos on Youtube

Bugat
Author by

Bugat

Updated on September 18, 2022

Comments

  • Bugat
    Bugat over 1 year

    I am looking for a way to efficiently and effectively remove all meetings that a terminated user may have created during their tenure.

    Currently, our group has to grant admin access to the user's mailbox, create a profile as that user, load up outlook and begin cleaning out recurring meetings and room bookings.

    I'm hoping there is a much simpler way, powershell perhaps, that can do this task.

  • HBruijn
    HBruijn over 8 years
    Welcome to Server Fault! It looks like you may have the knowledge to provide good Answer here, but please consider reading How do I write a good Answer? in our help center and then revise the Answer. Possibly your Commands/Code/Settings are technically be the solution but some explanation is welcome. Thanks in advance. Additionally it convention to format code as such.