none
Exchange 2010 - Configuring Room Mailboxes to automatically accept non conflicting meetings RRS feed

  • Question

  • I'm currently working on automatically generating Room Mailboxes that will accept any meeting request so long as there isn't a conflct. There are two ways I've been accomplishing this:

    1. Connect to the Mailbox through Outlook, then go to File -> Options -> Calendar -> Resource Scheduling, and then check the two boxes for "Automatically Accepting", and "Rejecting conflicts". Obviously this isn't Ideal when I'm creating 20 rooms a day.
    2. I've figured out how to do this using EWS to set flags:
    ###### START: SET AUTO PROCESSING ######
    
    # setup MAPI properties
    $flagAutoAccept  = New-Object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(0x686D,[Microsoft.Exchange.WebServices.Data.MapiPropertyType]::Boolean);
    $flagDisallowRecurring = New-Object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(0x686E,[Microsoft.Exchange.WebServices.Data.MapiPropertyType]::Boolean);
    $flagDisallowOverlap  = New-Object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(0x686F,[Microsoft.Exchange.WebServices.Data.MapiPropertyType]::Boolean);
    
    # GET MAILBOX
    $mailbox = Get-Mailbox $RoomName;
    
    # GET EXCHANGE SERVICE
    $service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP2);
    $service.AutoDiscoverUrl($mailbox.WindowsEmailAddress.ToString());
    
    # set calendar processing
    Set-CalendarProcessing $RoomName -AutomateProcessing "AutoAccept" -AllowConflicts $false -AllowRecurringMeetings $true;
    # get calendar
    $calName = [Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Calendar;
    $calID = new-object Microsoft.Exchange.WebServices.Data.FolderId($calName, $mailbox.WindowsEmailAddress.ToString());
    $calendarFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,$calID);
    
    # get inbox
    $inboxName = [Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Inbox;
    $inboxID = new-object Microsoft.Exchange.WebServices.Data.FolderId($inboxName, $mailbox.WindowsEmailAddress.ToString());
    $inboxFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,$inboxID);
    
    # SET PROPERTY
    # inbox
    $inboxFolder.SetExtendedProperty($flagAutoAccept, $true)
    $inboxFolder.SetExtendedProperty($flagDisallowRecurring, $false)
    $inboxFolder.SetExtendedProperty($flagDisallowOverlap, $true)
    $inboxFolder.update()
    #cal
    $calendarFolder.SetExtendedProperty($flagAutoAccept, $true)
    $calendarFolder.SetExtendedProperty($flagDisallowRecurring, $false)
    $calendarFolder.SetExtendedProperty($flagDisallowOverlap, $true)
    $calendarFolder.update()
    ###### END: SET AUTO PROCESSING ######

    The second option works well, but the settings aren't reflected if I mount the mailbox and look at the configuration manually (the boxes aren't checked); which is something admins check when troubleshooting permissions issues.

    Does anyone know the reason for this disparity and how I could correct it?

    Friday, April 12, 2013 5:56 PM

All replies