Need to delete the meeting requests made by terminated users from all the conference rooms for multiple terminated users at a time.
below is the script which i built to delete the meetings requests for two terminated users from all the conference rooms. i used OR
operator if i want to delete the meetings for two terminated users(kind:calendar from:sasi OR Kalai). How can i add more than two terminated users at a time? i have more than 500 terminated users to delete their meetings requests from all the conference rooms.
Write-Progress -Activity "Preparing" -Status "Retrieving mailbox list" -PercentComplete 0
$rooms=get-mailbox -recipienttypedetails roommailbox -resultsize unlimited -warningaction:silentlycontinue| where {$_.name -notlike "*test*"}
$count=$rooms.count
foreach($room in $rooms)
{
$i=$i+1
$percentage=$i/$count*100
Write-Progress -Activity "Collecting mailbox details" -Status "Processing mailbox $i of $Count - $room" -PercentComplete $percentage
$room | search-mailbox -searchquery "kind:calendar from:sasi OR Kalai" -targetmailbox sankar_munirathinam@domain.com -targetfolder "Deleting Meeting" -deletecontent -force
}