Delete a meeting created by a user whose email ID has been deleted from Office 365


 

To delete a meeting created by a user whose email ID has been deleted from Office 365 using Compliance Search, follow these steps:

Step-by-Step Guide

  1. Open PowerShell:

    • Launch PowerShell as an administrator.
  2. Install the Exchange Online Management Module:

    • If you haven't already, install the latest version of the Exchange Online Management module:
      Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.2.0
      
  3. Connect to Exchange Online:

    • Use the following command to connect to Exchange Online:
      Connect-ExchangeOnline -UserPrincipalName <your-admin-username>
      
  4. Create a Compliance Search:

    • Replace <SearchName> with a name for your search and <SearchQuery> with your search criteria:
      New-ComplianceSearch -Name "<SearchName>" -ExchangeLocation All -ContentMatchQuery 'Subject:"Meeting Subject"'
      
  5. Start the Compliance Search:

    • Start the search you created:
      Start-ComplianceSearch -Identity "<SearchName>"
      
  6. Delete the Search Results:

    • Once the search is complete, you can delete the items found by the search:
      New-ComplianceSearchAction -SearchName "<SearchName>" -Purge -PurgeType SoftDelete
      

Example Script

If you want to search for and delete all meetings with the subject "Team Meeting", the script would look like this:

# Install the Exchange Online Management module
Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.2.0

# Connect to Exchange Online
Connect-ExchangeOnline -UserPrincipalName <your-admin-username>

# Create a Compliance Search
New-ComplianceSearch -Name "SearchTeamMeetings" -ExchangeLocation All -ContentMatchQuery 'Subject:"Team Meeting"'

# Start the Compliance Search
Start-ComplianceSearch -Identity "SearchTeamMeetings"

# Delete the Search Results
New-ComplianceSearchAction -SearchName "SearchTeamMeetings" -Purge -PurgeType SoftDelete

Additional Resources

For more detailed instructions, you can refer to the Microsoft documentation on Compliance Search

If you need further assistance or run into any issues, feel free to ask! 😊

Comments

Popular posts from this blog

Everything You Need to Know About Online Archive in Office 365

How to Add a Custom Domain in Office 365 and Set Up Users with Business Standard License

Migrating from an on-premise system to Office 365 over view