删除终止用户发出的会议请求 [英] Deleting Meeting Requests made by terminated users
问题描述
需要删除所有会议室中终止用户向多个终止用户一次发出的会议请求.
Need to delete the meeting requests made by terminated users from all the conference rooms for multiple terminated users at a time.
下面是我构建的脚本,用于删除所有会议室中两个终止用户的会议请求.如果要删除两个已终止用户的会议(kind:calendar from:sasi或Kalai),我使用了OR
运算符.如何一次添加两个以上终止的用户?我有500多名终止用户要删除所有会议室中的会议请求.
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
}
推荐答案
因此,如果我对上述内容有正确的理解,您会执行以下操作吗?如果只是调查的话,您可以采用删除内容-力"吗?
So if I understand the above correctly, you'd do the following? and you can take the "deletecontent -force" if this is merely investigative?
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
$TerminatedUsers = Get-Content .\TerminatedUsersList.txt
foreach ($User in $TerminatedUsers) {
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:$($user)" -targetmailbox
administrator@domain.com -targetfolder "Deleting Meeting" -deletecontent -force
}
}
这篇关于删除终止用户发出的会议请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!