Exchange 2010 – transaction log files & iOS 6.1

Posted by robd on February 11, 2013
Apple, exchange, exchange 2010, iOS / No Comments

So anyone who looks after Exchange 2010 and allows users to connect their iPhones and or iPads will know the fun and games of mail going missing, calendars loosing invites or not matching their outlook calendars (most the above can be fixed by recreating the users mail profile on the ipad or in Outlook)….

Well to top this off iOS 6.1 seems to cause a sync loop on the Exchange mailbox server causing excessive transaction logs (thousands of logs in 15 minutes) which can lead to a very dead exchange server.

To combat this you’ll need to find the device and then turn off active sync for that user, or another route would be to block all iOS 6.1 devices from establishing a connection.  Edit: some people say removing the exchange mail profile from the iOS device and re-adding it solves the issue!!

To find the users, I’d first run a report of who has and hasn’t updated their devices by running a script that I’ve previous mentioned:



Alternatively if you’re scared of PowerShell or maybe a admin has blocked you for using it because you’ve been a naughty boy or girl you could use Log Parser Studio which is like a plugin for Log Parser!!  So install Log Parser on a CAS server and run Log Parser Studio, then point the tool at the IIS logs.  Finally use one of the built in search tools such as ActiveSync Report [Top 20] to find the which device has produced large amounts of hits and hence caused all the transaction logs!


So know you have a list of users who have iOS 6.1 you could disable active sync for each user via the Exchange control panel.

Or if you’d rather block all the iOS 6.1 and any future 6.1 devices you could run this the following PowerShell command that will create an Active Sync rule.

New-ActiveSyncDeviceAccessRule -QueryString "iOS 6.1 10B142" -Characteristic DeviceOS -AccessLevel Block

Note, if you don’t warn users they may complain about their devices not accepting passwords or similar!!

Tags: , , , , , ,

Exchange 2010 with Apple iOS 6

Posted by robd on January 15, 2013
exchange 2010 / 1 Comment

Since Apple update iOS to version 6 earlier this year I’ve had nothing but problems with calendar being mismatched between Apple devices and Outlook and users claiming mail has completely disappeared off the planet!!

Urggghh is my initial answer…..Now I try and tell users I really don’t think its Exchange as we patch like crazy and other devices such as Android and Microsoft work like a charm… But some fan boys don’t care what I have to say and blame me or MS anyhow!

The truth as far as I know it is its down to Apples adaptation of Active Sync that as far as I can tell must work totally different and seems to have been a bit of a after thought to the Apple product line.  Just for a info a quick and temporary solution is to remove the Exchange account from the iOS device and re-add it!

Interestingly MS don’t want ownership of these issues:


Tell users not to take action on calendars on iOS We’re not seeing this particular issue if users don’t take action on their calendar items (for example, accept, delete or change meetings).

Block iOS 6 devices Exchange server comes with the Allow/Block/Quarantine functionality that enables admins to block any device or user.

Also here’s a list of some issues:

Anyhow, to try and get a hold on the situation and find out all the iOS devices connecting to the Exchange environment (so I know whos going to moan at me at some point) I found a brilliant power-shell script by Steve Goodman, here:


The Script:

#    Generates a CSV file containing ActiveSync Device Statistics with iOS Specific Information. 
#    .PARAMETER OutputCSVFile 
#    Filename to save the output CSV file as 
#    .EXAMPLE 
#    .\Export-iOSDeviceStatistics.ps1 -OutputCSVFile C:\output.csv 
    [parameter(Position=1,Mandatory=$true,ValueFromPipeline=$false,HelpMessage="Output CSV File Name")][string]$OutputCSVFile 
# The following is a Hash Table containing information used to  
# map the Apple Device User Agent to it's corresponding iOS version (pre iOS 6) 
$iOSVersions=@{"508.11"="iOS 2.2.1"; 
        "701.341"="iOS 3.0.0"; 
        "701.400"="iOS 3.0.1"; 
        "702.367"="iOS 3.2"; 
        "702.405"="iOS 3.21"; 
        "702.5"="iOS 3.3"; 
        "703.144"="iOS 3.1"; 
        "704.11"="iOS 3.1.2"; 
        "705.18"="iOS 3.1.3"; 
        "801.293"="iOS 4.0.0"; 
        "801.306"="iOS 4.0.1"; 
        "801.400"="iOS 4.0.2"; 
        "802.117"="iOS 4.1"; 
        "803.148"="iOS 4.2.1"; 
        "806.190"="iOS 4.3"; 
        "806.191"="iOS 4.3"; 
        "807.4"="iOS 4.3.1"; 
        "808.7"="iOS 4.3.2"; 
        "810.2"="iOS 4.3.3"; 
        "811.2"="iOS 4.3.4"; 
        "812.1"="iOS 4.3.5"; 
        "901.334"="iOS 5"; 
        "901.403"="iOS 5.0.1"; 
        "901.405"="iOS 5.0.1"; 
        "901.406"="iOS 5.0.1"; 
        "902.176"="iOS 5.1"; 
        "902.179"="iOS 5.1"; 
        "902.206"="iOS 5.1.1"}; 
# Retrieve mailboxes of users who have a connected ActiveSync Device 
$CASMailboxes = Get-CASMailbox -Filter {hasactivesyncdevicepartnership -eq $true -and -not displayname -like "CAS_{*"} -ResultSize Unlimited; 
[array]$Mailboxes = $CASMailboxes | Get-Mailbox; 
# Create an array to store the output 
# Perform a set of actions against each mailbox retrieved  
foreach ($Mailbox in $Mailboxes) 
    # Retrieve the ActiveSync Device Statistics for the associated user mailbox 
    [array]$ActiveSyncDeviceStatistics = Get-ActiveSyncDeviceStatistics -Mailbox $Mailbox.Identity; 
    # Use the information retrieved above to store information one by one about each ActiveSync Device 
    foreach ($Device in $ActiveSyncDeviceStatistics) 
        $iOSVersion = $null; 
        # First check if it's iOS 6 or higher, which reports the iOS version: 
        if ($Device.DeviceOS -like "iOS*") 
            $iOSVersion = $Device.DeviceOS; 
            $iOSModel = $Device.DeviceFriendlyName; 
        } else { 
            # Where possible use the information stored in the Device User Agent to understand the iOS device version in use 
            if ($Device.DeviceUserAgent -like "*/*")  
                $rawiOSVersion = ($Device.DeviceUserAgent).Substring(($Device.DeviceUserAgent).IndexOf("/")+1); 
                if ($iOSVersions[$rawiOSVersion]) 
                    $iOSVersion = $iOSVersions[$rawiOSVersion]; 
            $iOSModel = $Device.DeviceModel; 
        if ($iOSVersion) 
            # Create a new object to store this ActiveSync device information in our CSV file 
            $OutputItem = New-Object Object; 
            # Add information to the object 
            $OutputItem | Add-Member NoteProperty Username $Mailbox.UserPrincipalName; 
            $OutputItem | Add-Member NoteProperty "Display Name" $Mailbox.DisplayName; 
            $OutputItem | Add-Member NoteProperty "Device Type" $Device.DeviceType; 
            $OutputItem | Add-Member NoteProperty "Device Model" $iOSModel; 
            $OutputItem | Add-Member NoteProperty "iOS Version" $iOSVersion; 
            $OutputItem | Add-Member NoteProperty "Device ID" $Device.DeviceID 
            $OutputItem | Add-Member NoteProperty "Status" $Device.Status 
            $OutputItem | Add-Member NoteProperty "ActiveSync Policy" $Device.DevicePolicyApplied 
            $OutputItem | Add-Member NoteProperty "ActiveSync Policy Status" $Device.DevicePolicyApplicationStatus 
            $OutputItem | Add-Member NoteProperty "Last Sync" $Device.LastSuccessSync 
            $OutputItem | Add-Member NoteProperty "Last Sync Attempt" $Device.LastSyncAttemptTime 
            $OutputItem | Add-Member NoteProperty "Last Policy Update" $Device.LastPolicyUpdateTime 
            $OutputItem | Add-Member NoteProperty "First Sync" $Device.FirstSyncTime 
            # Add the object to our array of output objects 
            $Output += $OutputItem; 
# Print the output object to the screen in a table format with a subset of details for ease of reading 
$Output | Format-Table Username,"iOS Version","Device Model","Last Sync" 
# Export the full set of data to the specified CSV file 
$Output | Export-CSV -Path $OutputCSVFile -NoTypeInformation

Tags: , , , ,