This is a tool/sample I’ve had sitting on my drive ever since the DST changes back in 2007. Until recently, this tool used internal MAPI properties and algorithms, which meant I couldn’t share the source. The Exchange Protocol docs have changed that, so I thought I’d clean the tool up and publish it so everyone can benefit.
The problem to solve here is how to deploy Auto Accept settings across a large number of mailboxes. These settings are typically used to configure the Outlook direct booking feature for resource mailboxes. It’s easy to set these for one mailbox. Tools/Options/Calendar Options/Resource Scheduling will bring up this dialog:
From there, just check the settings you want and Auto Accept is configured. Suppose you want to do it for a bunch of mailboxes? We don’t have a way of deploying these settings. That’s where SetAA comes in. The SetAA sample shows how to modify the properties that store the settings:
PR_SCHDINFO_AUTO_ACCEPT_APPTS – "Automatically accept meeting requests and process cancellations"
PR_SCHDINFO_DISALLOW_OVERLAPPING_APPTS – "Automatically decline conflicting meeting requests"
PR_SCHDINFO_DISALLOW_RECURRING_APPTS – "Automatically decline recurring meeting requests"
In addition to dealing with these properties, SetAA gave me a chance to try implementing the “Finding the Free/Busy Message” algorithm from [MS-OXOPFFB]. I talked about this algorithm here, but this is the first time I’ve tried implementing it.
I decided to post both the sample code and a compiled copy of setAA in case anyone wants to try it out but doesn’t want to deal with building it:
As usual, all caveats and disclaimers for samples apply. You can run SetAA from the command line (use –? to get help) to control the settings for a single maibox, or even every mailbox on a server. If you want to run SetAA against a targeted group of mailboxes, you could run it in a for loop. For instance, suppose you want to disable all three Auto Accept settings on a set of mailboxes. You’d put a list of legacy DNs for the mailboxes in a file (here called legdns.txt), and run it like this:
for /F "delims=" %i in (legdns.txt) do @SetAA -p "Outlook" -m "%i" -Z
Where “Outlook” is the name of the profile and –Z is the switch to completely disable Auto Accept settings for the mailboxes listed in the text file. Note also that if you put this command in a batch file, you’d need to use %%i instead of %i.