Exchange and iPhone Calendar Issues
March 3, 2011 by in IT Infrastructure

We have a couple of clients who contacted us recently and said some of their iPhone users – executives of course – were having calendar items disappear from their calendars. We researched the issue, but couldn’t find much solid information. Although several people have reported this problem, they are generally lumped together with iPhone users who are having overall sync problems. A resolution to this specific problem has not been identified.
Then one client told us that they heard from Microsoft that this is a known bug in both Exchange Server and in the iPhone. Apparently the bug has been fixed in Exchange Server 2010 SP1, and Apple has a fix for it in an upcoming release of IOS.
- For Exchange 2010, install Exchange 2010 SP1
- For Exchange 2007, install SP3 RU3
and
- Get the Apple device iOS 4.3 beta 3. You have to contact Apple Support for availability.
We developed a workaround that seems to have solved the problem until Apple releases their update and it gets installed on people’s iPhones. We wrote a PowerShell script that identifies all users with iPhones and then we enabled the Calendar Repair Assistant to repair their calendars. The Calendar Repair Assistant goes through mailboxes and fixes inconsistencies. We found that in most cases it will replace missing meeting requests for users. The Calendar Repair Assistant is part of the Exchange Mailbox Assistants service; you can learn more about it at:
http://technet.microsoft.com/en-us/library/ee424432.aspx
During a defined time or duration, Calendar Repair Assistant will review calendar items for inconsistencies in mailboxes for which it is enabled. Here are the main steps I took and commands I used to work with the Calendar Repair Assistant:
Disable repair for all users on a mailbox server
I first used the following command to disable Calendar Repair ($true), because I only wanted to enable the service for users who I knew were experiencing problems:
get-mailbox -server <mailbox server> -resultsize Unlimited | Set-Mailbox -CalendarRepairDisabled $true
Enable repair for individual mailboxes
I then enabled Calendar Repair for individual users with the following command:Set-Mailbox -Identity <UPN> -CalendarRepairDisabled $false
Schedule for Mailbox Server
I then set the schedule to run for an hour every hour and let it run for 24 hours using the following command:
Set-MailboxServer -Identity admMBX2 -CalendarRepairWorkCycle 1.00:00:00 -CalendarRepairWorkCycleCheckpoint 1.00:00:00
Log location on Mailbox Server
Once the Calendar Repair Assistant starting doing its thing, I could see what it found by reviewing the log at the followinglocation:
C:\Program Files\Microsoft\Exchange Server\V14\Logging\Calendar Repair Assistant
View mailboxes with CalendarRepair enabled
Finally, if I wanted to review the users who have the assistant enabled, I could run the following command:
get-mailbox -server <mailbox server) -Filter “CalendarRepairDisabled -eq `$false” -ResultSize unlimited
This approach seemed to solve the problem for those users who had the Calendar Repair Assistant enabled. Occasionally, a user will see a meeting request in their calendar that was put there by the Calendar Repair Assistant as part of the repair. There is a large notice at the bottom of the calendar item that it was put there by the Calendar Repair Assistant.
However, users who did not have the Calendar Repair Assistant enabled would continue to experience problems. This meant we had to add users now and again to the list of enabled mailboxes.
To get around this issue until a fix is released and deployed for the iPhone, my favorite developer Ed Brovick borrowed a script written by Jan Egil Ring from here that identifies all iPhones on an Exchange mailbox server. Ed then added code to the script that pipes the results through the cmdlet that turns the Calendar Repair Assistant on for those mailboxes with iPhones. The final script looks like this:
#
#
# NAME: Get-ActiveSyncDeviceInfo.ps1
#
}
# AUTHOR: Jan Egil Ring
# EMAIL: jan.egil.ring@powershell.no
#
# COMMENT: Script to retrieve all ActiveSync-devices registered within the Exchange-organization.
# A conversion-table for Apple-devices are provided, you might remove this if you want to
# retrieve the real DeviceUserAgent-names for those devices.
# The script outputs objects to make it easier working with the results, i.e. to export
# the output using Export-Csv, sort them, group them and so on.
# Works with both Exchange 2007 and Exchange 2010. Since a new cmdlet, Get-ActiveSyncDevice,
# exist in Exchange 2010, you might want to use that when working against Exchange 2010.
#
# For more information, see the following blog-post:
# http://blog.powershell.no/2010/09/26/getting-an-overview-of-all-activesync-devices-in-the-exchange-organization
#
# You have a royalty-free right to use, modify, reproduce, and
# distribute this script file in any way you find useful, provided that
# you agree that the creator, owner above has no warranty, obligations,
# or liability for such use.
#
# VERSION HISTORY:
# 1.0 26.09.2010 – Initial release
#
#
#Retrieve all mailboxes in the Exchange organization
$mailboxes = Get-Mailbox -ResultSize unlimited
$mailbox
#Loop through each mailbox
foreach ($mailbox in $mailboxes) {
$devices = Get-ActiveSyncDeviceStatistics -Mailbox $mailbox.samaccountname | Select-Object DeviceType,DevicePolicyApplied,LastSuccessSync,DeviceUserAgent
#If the current mailbox has an ActiveSync device associated, loop through each device
if ($devices) {
foreach ($device in $devices){
#Conversion table for Apple-devices
switch ($device.DeviceUserAgent) {
“Apple-iPhone/701.341″ {$DeviceUserAgent = “iPhone”}
“Apple-iPhone/703.144″ {$DeviceUserAgent = “iPhone”}
“Apple-iPad/702.367″ {$DeviceUserAgent = “iPad”}
“Apple-iPod2C1/801.293″ {$DeviceUserAgent = “iPod”}
“Apple-iPod3C1/801.293″ {$DeviceUserAgent = “iPod”}
“Apple-iPhone1C2/801.293″ {$DeviceUserAgent = “iPhone 3G”}
“Apple-iPhone2C1/801.293″ {$DeviceUserAgent = “iPhone 3GS”}
“Apple-iPhone3C1/801.293″ {$DeviceUserAgent = “iPhone 4″}
“Apple-iPhone/508.11″ {$DeviceUserAgent = “iPhone”}
“Apple-iPhone/701.400″ {$DeviceUserAgent = “iPhone”}
“Apple-iPhone/704.11″ {$DeviceUserAgent = “iPhone”}
“Apple-iPhone/705.18″ {$DeviceUserAgent = “iPhone”}
“Apple-iPod2C1/801.306″ {$DeviceUserAgent = “iPod”}
“Apple-iPod3C1/801.306″ {$DeviceUserAgent = “iPod”}
“Apple-iPhone1C2/801.306″ {$DeviceUserAgent = “iPhone 3G”}
“Apple-iPhone2C1/801.306″ {$DeviceUserAgent = “iPhone 3GS”}
“Apple-iPhone2C1/801.400″ {$DeviceUserAgent = “iPhone 3GS”}
“Apple-iPhone3C1/801.306″ {$DeviceUserAgent = “iPhone 4″}
default {$DeviceUserAgent = $device.DeviceUserAgent}
}
#Create a new object and add custom note properties for each device
$deviceobj = New-Object -TypeName psobject
$deviceobj | Add-Member -Name User -Value $mailbox.samaccountname -MemberType NoteProperty
$deviceobj | Add-Member -Name DeviceType -Value $device.DeviceType -MemberType NoteProperty
$deviceobj | Add-Member -Name DeviceUserAgent -Value $DeviceUserAgent -MemberType NoteProperty
$deviceobj | Add-Member -Name DevicePolicyApplied -Value $device.DevicePolicyApplied -MemberType NoteProperty
#$deviceobj | Add-Member -Name LastSuccessSync -Value ($device.LastSuccessSync).ToShortDateString() -MemberType NoteProperty
#Write the custom object to the pipeline
#Write-Output -InputObject $deviceobj
if ($deviceobj.DeviceUserAgent -eq “iPhone”) {
$D = “Set-Mailbox -Identity ” + $deviceobj.user + ” -CalendarRepairDisabled 0″
$D
# write-Output -Inputobject $deviceobj.user
invoke-expression $D
#$deviceobj.user
}
}
}
The result is that all users with iPhones on the mailbox server have the Calendar Repair Assistant enabled, which should prevent calendar items from disappearing and causing problems for those users.
To see which users had the Calendar Repair Assistant enabled by the script, run this command again:
get-mailbox -server <mailbox server) -Filter “CalendarRepairDisabled -eq `$false” -ResultSize unlimited
After a permanent fix is found, I recommend disabling the Calendar Assistant for all users with the following command:
get-mailbox -server <mailbox server> -resultsize Unlimited | Set-Mailbox -CalendarRepairDisabled $true
This bug affects users with iPhones who have many calendar items that are changing and large mailboxes – the exact profile of most corporate executives. So putting this solution in place until the patch is available may keep your boss on schedule and increase the score of your next annual review.



iOS 4.3 was released on March 9th. This, along with Exchange Server 2007 SP3 or Exchange Server 2010, should resolve the calendaring issue.
Even after the release of iOS 4.3 I am getting reports about this issue still happening. Stay Tuned.
What can we do if we are running exchange 2007? Are there similiar commands?
Unfortunatly, the Calendar Repair Assistant is only available in Exchnage Server 2010.
I would verify you have the following installed on your Exchange Servers and iPhones:
-Exchange 2007 SP3 RU3
-iOS 4.3
Has anyone ever found a final solution for this? We recently upgraded to SP3 and are having some serious calendar synch issues. Already on 4.3 on the iPhones. Will RU3 resolve the issue?
I’m seeing this same issue patch fully to Exchange 2010 SP1 RU3v3 and 4.3.3 in the iOS. It’s so random … I’ve spend hours trying to reproduce this without luck.
Unfortunately, this problem still persists is many organizations. The mailbox repair assistant process outlined above has often helped and for some companies it has greatly reduced the calendaring issues. For others, it hasn’t been as successful and they’ve had iPhone users stop syncing their calendar to avoid missing meetings and other appointments. I believe it’s an iOS issue and Apple isn’t racing to fix their consumer devices that are being used in the corporate world.
Is the problem more prevalent with users that have calendars with delegate access?
This almost seems to be the most common trait we have found with this issue.
Could be. In my experience it seems to be more prevalent with executives and managers and they tend to be the ones with delegate access. However, they also tend to be the ones who are most vocal and have iPhones.
Bill – for organizations using Exchange 2007, is there a process you recommend in lieu of the calendar repair assistant?
Thanks for the info. Could you clarify if you set this up against Exchange 2010 RTM or SP1? Some changes were made to the Microsoft Exchange Mailbox Assistants and CRA in SP1. I’m planning to test the CRA and I have SP1. Thanks.
I do believe SP1 was installed. Testing is a great idea.
We’ve been battling this issue – and it goes beyond iPhones. We’ve studied this and have found that it can also impact Outlook on the desktop – where meetings are on the mobile device (iPhone or whatever) but not on the desktop client.
We’re quite confident that it is a Exchange flaw that will hopefully be released by the next service pack. Right now, we tell our clients to use the web interface as gospil; everything else is “maybe true”.
Given the lack of any attention to this issue by both Apple and Microsoft, you may be right that there is a problem with Exchange. However, if you see appointments on the mobile device and OWA but not Outlook you may have a synchronization issue with Outlook in Cached Mode. Taking the client out of Cache Mode, deleting (or renaming) the OST file, and then reconfiguring Cached Mode may help this issue.
We are having the same issues on exchange 2007SP3 roll update 8 with IOS6.
Have someone find a solution?
A solution may be here:
iOS 6.0.1 is said to “Fixes a bug affecting Exchange meetings”
http://www.macrumors.com/2012/11/01/apple-releases-ios-6-0-1-with-fixes-for-keyboard-screen-glitch-camera-flash-issues-and-more/
Hi,
Doesn’t the calendar repair look at the Organizer’s Caledar as Master reference copy ? What if the Organizer is not using an Iphone, but sending to attendees that are using Iphones ? Do I have to enable the Organizer for Calendar repair also ? Also, related to the same question, if the Organizer and Attendee are on different mailbox servers, does the calendar repair have to be running on both servers to fix the inconsistencies ? Thanks for this informational article.
Yes, “Its intended purpose is to help maintain consistency of calendar meetings between an organizer and the attendees by comparing the meeting copies of the organizer and the attendees.” says the Exchange blog. As for your second question, that seems to be the most common scenario. But I don’t think the sender plays a role in this.
Does the CRA have to be running on all mailbox servers to fix inconsistencies? Yes, but as part of the MS Exchange Mailbox Assistants service it’s running by default. It will only repair calendars for mailboxes in which it has been enabled.