一度に複数の終了ユーザーのすべての会議室から、終了ユーザーによって作成された会議出席依頼を削除する必要があります。
以下は、終了した 2 人のユーザーの会議出席依頼をすべての会議室から削除するために作成したスクリプトです。OR
終了した 2 人のユーザー (kind:calendar from:sasi OR Kalai) の会議を削除する場合は、operator を使用しました。一度に 3 人以上の終了ユーザーを追加するにはどうすればよいですか? すべての会議室から会議出席依頼を削除するために、500 人以上の終了したユーザーがいます。
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
}