Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance 论坛
Viewing all articles
Browse latest Browse all 8719

Delete orphaned calendar entries - unknown email address

$
0
0

I'm looking for some assistance looping through resource mailboxes calendars and deleting the items where the meeting organizer is no longer with the company

I know this topic has come up a number of times in the forums. However most answers are specific to clean up when you know the name (or email) of the terminated employee. I would like to search the resource mailbox calendar and for each calendar item returned, based on the organizer of the meeting, check in AD to see if the user account exists or not. If the user account no longer exists (i.e. the meeting is orphaned), delete the calendar entry. 

Can I  use Search-Mailbox to loop through the items found in a mailbox to perform actions? I kind of see it as a intital query that returns a record set based on the filter being performed. Can I then loop through that record set and gather more information to perform additional operations?

My current test to get all calendar entries is as follows.

Get-Mailbox -recipienttypedetails RoomMailbox -resultsize unlimited  | Search-Mailbox -SearchQuery kind:meetings -EstimateResultOnly



Viewing all articles
Browse latest Browse all 8719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>