Hi @Roger Roger,
Welcome to the Microsoft Q&A platform!
According to your description, to remove calendar reservations from a room mailbox in Exchange Online, you can use PowerShell to search for and remove the meeting based on the subject. Since you are not sure if it's a recurring meeting, you should first search for all occurrences of meetings with the specified subject and then remove them.
Here's a step-by-step guide:
- Open PowerShell and run the following commands to connect to Exchange Online:
$UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session -DisableNameChecking
- Use the
Search-Mailbox
cmdlet to search for calendar items with the subject "xyzmeeting" in the room mailbox's calendar.
ReplaceSearch-Mailbox -Identity room1@contoso.com -SearchQuery 'Subject:"xyzmeeting"' -SearchDumpsterOnly:$false -TargetMailbox <YourMailbox> -TargetFolder "SearchResults" -LogLevel Full
<YourMailbox>
with your own email address. This command will search the room mailbox for all meetings with the subject "xyzmeeting" and copy them to a folder named "SearchResults" in your mailbox. - After verifying the search results, you can remove the calendar items. Use the
Remove-MailboxItem
cmdlet to remove the meetings found in the previous step.
Note:$items = Search-Mailbox -Identity room1@contoso.com -SearchQuery 'Subject:"xyzmeeting"' -SearchDumpsterOnly:$false -EstimateResultOnly | Select-Object -ExpandProperty ResultItems foreach ($item in $items) { Remove-MailboxItem -Identity room1@contoso.com -ItemId $item.Id }
Remove-MailboxItem
cmdlet may not be available in all environments. If you do not have it, you can useRemove-MailboxCalendarItem
for a more precise removal. - Ensure that the items are removed by checking the room mailbox's calendar and ensuring that there are no meetings with the subject "xyzmeeting."
Remember to replace room1@contoso.com
with the actual alias of your room mailbox. This process should help you remove the specified calendar reservations. If you encounter issues or specific cmdlets are not available, consider checking your permissions and the availability of commands in your Exchange Online environment.
Please feel free to contact me if you have any queries.
Best,
Jake Zhang