Share via


Delete Meeting invite

Question

Tuesday, October 1, 2019 1:00 AM

Hi Expert
One of my user has left the organization and he has earlier created calendar meeting requests.
I want to delete this request from all the users calendar, let say the meeting invite subject is "Daily Meeting at 5PM-6PM". is it possible to delete using the subject. i am not sure, experts guide me on this

All replies (5)

Wednesday, October 2, 2019 2:28 AM ✅Answered

Hi Roger,

If the mailbox has not been deleted by admin, and your org are using Exchange 2019/Online, we could cancel all meetings created by this user via the Remove-CalendarEvents cmdlet:

Get-Mailbox <Separated Employees> |  Remove-CalendarEvents -CancelOrganizedMeetings -QueryStartDate mm/dd/yyyy

Please note that you should specify the check-in date of the separated employees in the -QueryStartDate switch.

While if any of the condition above is not met, then we need to use the Search-Mailbox cmdlet to remove the all meetings with the subject "Daily Meeting at 5PM-6PM".

Get-Mailbox | Search-Mailbox -SearchQuery "kind:meetings AND Subject:'Daily Meeting at 5PM-6PM'" -DeleteContent

Hope it helps.

Regards,

Manu Meng

Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].


Tuesday, October 8, 2019 7:35 AM ✅Answered

The following command works fine:

For a single user:

Get-Mailbox [email protected]| Search-Mailbox -SearchQuery "kind:meetings AND Subject:'daily meeting 5PM-6PM' From:[email protected]" -DeleteContent  

For bulk users:

$mailboxes = Import-Csv C:\userslist.csv
foreach($mailbox in $mailboxes){
Search-Mailbox -Identity $mailbox.Name -SearchQuery "kind:meetings AND Subject:'daily meeting 5PM-6PM' From:[email protected]" -DeleteContent -Force
}

Regards,

Manu Meng

Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].


Wednesday, October 2, 2019 6:42 PM

Hi The below syntax works for me but i want to delete the meeting invites from user1

Search-Mailbox -Identity [email protected] -SearchQuery "kind:meetings AND Subject:'daily meeting 5PM-6PM'"  -DeleteContent

When i try the below sytnax i am getting error

Search-Mailbox -Identity [email protected] -SearchQuery "kind:meetings AND Subject:'daily meeting 5PM-6PM'" AND From:[email protected] -DeleteContent
A positional parameter cannot be found that accepts argument 'From:[email protected]'.
    + CategoryInfo          : InvalidArgument: (:) [Search-Mailbox], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Search-Mailbox
    + PSComputerName        : outlook.office365.com

Lets say [email protected] has left the company and his mailbox is disabled/deleted and he has sent meeting invitation to 5 users with subject "Daily Meeting at 5PM-6PM"
i have these 5 users in csv file, how can i import these 5 users and delete the meeting requests which were sent from [email protected]

Name
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

I am trying the below syntax experts guide me as i am getting error
$mailboxes = Import-Csv C:\userslist.csv
foreach($mailbox in $mailboxes){
Search-Mailbox -Identity $mailbox.Name -SearchQuery 'From:"[email protected]" AND {subject:"daily meeting 5PM-6PM" AND kind:meetings}  -DeleteContent -Force
}


Thursday, October 3, 2019 1:57 PM

hi experts please advise..


Thursday, October 10, 2019 9:01 AM

Just checking in to see if above information was helpful. Please let us know if you would like further assistance.

Regards, 

Manu Meng

Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].