none
Clean up on Room Mailbox RRS feed

  • Question

  • Hi,

    How can i delete the organizer who left from the company from all room mailboxes? Because this is making a issue for future reservation for the existing users.

    i tried the below command. but this is deleting only the meetings requests, not from the room mailbox. I need to delete room booking by the organizer who is terminated from the company from the all room mailboxes

    search-mailbox -id roommailbox -searchquery "kind:meetins from:sankar_munirathinam" -deletecontent

    Sankar M

    http://messagingdevelopment.blogspot.in/

    Thursday, November 29, 2012 12:03 PM

Answers

  • You can use Import-CSV or Get-Content to read in a list of users then make your search operations inside those loops. You can automate the whole thing eg  something like

    get-mailbox -RecipientTypeDetails RoomMailbox | foreach-object
    $room = $_
    import-csv blah.csv | foreach-object{

    }}

    BTW if you have Exchange 2007 or 2010 you have EWS.

    Cheers
    Glen

    Tuesday, December 4, 2012 5:41 AM

All replies

  • You need to use kind:calendar to delete Calendar Items

    Cheers
    Glen

    Friday, November 30, 2012 9:51 AM
  • Hi glen,

    thanks for your reply... always i used to visit your blog as it is giving very useful info... i became a fan of you..

    i have list of 50 terminated users.. how can i remove bulk terminated users who has left from the company from all the room mailboxes? Using OR boolean operator i can use only two terminated users at a time.. 

    Sankar M

    http://messagingdevelopment.blogspot.in/

    Friday, November 30, 2012 5:19 PM
  • If your using Remote powershell you'd be better just to run a separate operation for each user, its not really a time critical thing and having a large query with lot of predicates is only going to run slow and stress the server unnecessarily.

    One option is to use EWS instead and create yourself a hash of all the users you want to deleted, Then instead of a Searching the calendar just enumerate all the appointments in each calendar and check the organizers against your user hash, than build batches of all the appointments you want to delete. That would be quickest method i could think of but will require a bit of coding to do.

    Cheers
    Glen

    Monday, December 3, 2012 4:44 AM
  • Hi Glen,

    thank you,,,, we have not installed EWS.In our organisation we are having more than 30 k users. So we must run this clean up process on all room mailboxes for the terminated users on weekly basis or monthly basis..Is it possible to run one time clean up for multiple terminated users which is listed in text file?

    sankar M

    http://messagingdevelopment.blogspot.in/

    Monday, December 3, 2012 12:41 PM
  • You can use Import-CSV or Get-Content to read in a list of users then make your search operations inside those loops. You can automate the whole thing eg  something like

    get-mailbox -RecipientTypeDetails RoomMailbox | foreach-object
    $room = $_
    import-csv blah.csv | foreach-object{

    }}

    BTW if you have Exchange 2007 or 2010 you have EWS.

    Cheers
    Glen

    Tuesday, December 4, 2012 5:41 AM
  • thanks glen,

    sankar M

    http://messagingdevelopment.blogspot.in/

    Wednesday, December 5, 2012 9:45 AM
  • Hi glen,

    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
    

    }

    sankar M


    Sankar M http://messagingdevelopment.blogspot.in/


    Friday, January 25, 2013 3:33 PM
  • Hi glen,

    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
    

    }

    sankar M


    Sankar M http://messagingdevelopment.blogspot.in/


    Hello Sankar and all.

    i have 2 test room mailbox in Exchange 2010 and testmailbox made a test meeting and meeting rooms are accepted 

    I removed the testmailbox from EMC (No AD and No Mailbox) and ran the above script it was ran sucessfully without any compliation errors

    but the meetings are still available in the Room mailbox Calendar and not getting vanished.

    Is there anthing tricky behind this

    My test Lab is running E2010 with sp2


    ramakrishnan

    Wednesday, February 13, 2013 1:27 PM
  • i had mentioned in script to exclude the test mailboxes 

    where {$_.name -notlike "test"}

    did you modify this?




    Sankar M http://messagingdevelopment.blogspot.in/

    Wednesday, February 13, 2013 1:38 PM
  • i have removed this

    where {$_.name -notlike "test"} still it is no go....giving 0 KB and Result is 0

    Meeting is not deleting from Calendar


    ramakrishnan

    Sunday, February 17, 2013 9:15 AM