Conference Room Appointment Deletion

Good day all!  

I have a requirement to be able to purge all appointments created by X user from today's date going forward on all of our conference rooms.  I've found a script located here:

https://code.msdn.microsoft.com/office/PowerShellEWS-Search-e0f9c169#content

This script works great for individual mailboxes, however, instead of performing a search on just one mailbox, I would like this script to crawl all mailboxes in our environment with the RecipientTypeDetails -eq "RoomMailbox"

So it would be something like get-mailbox -ResultSize unlimited | where {$_.Recipienttypedetails -eq "RoomMailbox", and then run the above script with the startdate specified.

I'm sure there is a way to do this just within the original script, but I'm not a scripting guru.

Any help is greatly appreciated!!!!

Jeff

July 21st, 2015 10:35am

The script has a -Mailbox parameter, which you can populate with the values from the Get-Mailbox cmdlet. For example:

Search-Appointments.ps1 -Mailbox room@domain.com

To run this against all mailboxes, try something like this:

Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails RoomMailbox | % { Search-Appointments.ps1 -Mailbox $_.Mailbox }

Make sure to populate the user, start/end date and other parameters as needed. And to test it first :)


Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 3:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics