Update 12th February 2013: Yep, iOS 6.1 and 6.1.1 are out and causing more issues, where a meeting request response can cause catastrophic transaction log growth by resubmitting the same request repeatedly to Exchange 2010. You’ll find more information at the following Microsoft KB article:
The scripts below identify all post-iOS 6 versions as well as earlier versions, so you can choose a course of action for iOS 6.1 and iOS 6.1.1 devices (even the “switch it on and switch it off again” solution proposed by Apple) and also warn users with pre-iOS 6.1 devices not to upgrade their devices.
Original Article
If you’ve been following the Exchange and Apple-related news lately, you can’t have failed to hear about a number of bugs in the new iPhone, iPad and iPod Touch OS, iOS 6. No – I’m not talking about the dire Maps replacement, I’m talking about a few ActiveSync related bugs that have caused issues for a number of companies and we’re starting to hear about more and more in the wild.
What’s the problem, then? Well, in iOS the two most widely reported ones relate to:
- AutoDiscover – It doesn’t work unless the Email Address and UPN match.
- Meeting Requests – The iOS device loses track of the organizer and replaces the device user as the organizer instead, allowing the device user to update or cancel meetings other people have asked them to attend. For more info, see KB 2768774
Some people have suggested a good solution to this is to block iOS 6, however I’m not so sure. As a consultant I’m on the road a lot, and if my device was blocked then I’d be in deep water – I rely on it to keep in touch with customers and colleagues when I’m out and about. So, I don’t think blocking an update that comes through semi-automatically will win Exchange administrators any friends within their business.
Another method you might want to consider is to find those iOS 6 users within your organization and tell them about the issue. It might not be practical in all situations, but with the help of the script below (which will also report future and previous versions) you’ll be able to see what the task in hand looks like.
Use the script as follows:
.\Export-iOSDeviceStatistics.ps1 -OutputCSVFile .\output.csv
You’ll see output about iOS devices shown in the PowerShell session:
And the resulting CSV file can be opened in Microsoft Excel, or your favourite CSV editor:
@stevegoodman I think iOS 8.1 is causing the rapid Exch2010 log file issues as 6.1 http://t.co/aEH6nwoWKv had issue day after 8.1 release
This script works great for our iPhones. Is there a version that will pull the same data for Android and Windows phones as well?
Here is a quick one liner that might help,
Get-ActiveSyncDevice | select-object DeviceModel,FriendlyName,DeviceOS,UserDisplayName | sort-object devicemodel | Ft -autosize -wrap
Steve,
Rob Moritz was on the right track, whether or not 6.0+ is required. You left out several iOS versions below 6.0 Here is another reference if you prefer: http://www.enterpriseios.com/wiki/Complete_List_of_iOS_User_Agent_Strings?page=1.
This bit us as we had a few users with user-agent strings that did not show up in the output. Our mistake for using the output file as authoritative (ah to have MDM… someday), but we disabled insecure TLS renegotiation, breaking all pre-iOS 5.0 devices. Not a huge deal, your script gave us an excellent starting point, addressing well over 90% of all non-compliant devices.
Thanks,
Dustin
Hi Steve,
The script works great with one exception. It does not enumerate all users if they are not in the default domain. I tried adding the -IgnoreDefaultScope switch to the Get-Mailbox command on line 44 but that did not help. Can you take a look to see what needs to be changed?
Many thanks!
Great script very helpful for my MDM migration. Any chance that I can get the IMEI added to this report? Not sure if Exchange would even store this information? Thanks
Hi Steve, thanks for the script. We are trying to implement an ActiveSync quarantine device rule for phones with iOS 6.1 to 6.1.1 and would like to know how many devices have it and which users are affected. We’ve found that filtering for “iOS 6.1.1” returns results for “iOS 6.1.1” as well as “iOS 6.1” but importantly not “iOS 6.1.2”. We’re a little confused though, as when we run the following command:
Get-ActiveSyncDevice | where {$_.DeviceOS -match “iOS 6.1.1”} | Get-ActiveSyncDeviceStatistics | measure
We get a count of 845. Whereas when we run your script and filter the resultant Excel worksheet to the iOS versions we want, we only get 74. Is the script doing something different to ours?
Thanks,
Duncan
Great script.
Little addition.
I added 2 lines after “$iOSVersion = $Device.DeviceOS” (line 70);
$split = $iOSVersion.split(” “)
$iOSVersion = ($split[0] + ‘ ‘ + $split[1])
To get a uniform output with all iOS versions
A beautiful thing. Thanks!
Hi Steve,
How long should the script take to show any output? I’ve run it on both our MB and CAS servers (from V14 directory) and it sits there with no output (screen nor file) for 10+ minutes. It also never creates the output file. We’re running Exch2010/SP1, and have well under 1000 mailboxes.
Thanks.
MIA
Finally some kind of (screen) output:
[PS] C:\Program Files\Microsoft\Exchange Server\v14>.\Export-iOSDeviceStatistics.ps1 -OutputCSVFile .\iOS.csv
WARNING: You currently have 10 Exchange ActiveSync partnerships out of 10 maximum partnerships allowed per user. After you reach the maximum, no new partnerships can be created until you remove some from your account.
So I assume it is running?
Patience… it completed. Thanks Steve.
Rob,
I do not see anything happening after this screen. Im running thins on a Exchange 2010 SP1 environment under Exchange management shell.
cmdlet Export-iOSDeviceStatistics.ps1 at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
OutputCSVFile: IOS
I think I reacted too quickly. I get the following error. We have a CCR setup our Mialbox servers which are 2007. and our edge and case are exchange 2010.
The Get-ActiveSyncDeviceStatistics command that you are trying to run, which is version 14, requires that the target ma
ilbox account is on a Mailbox server that is the same version. The command wasn’t able to process your request because
the target mailbox account is on a Mailbox server with version 8. Please use this version (Version: 8) of the Get-Activ
eSyncDeviceStatistics command.
+ CategoryInfo : InvalidArgument: (:) [Get-ActiveSyncDeviceStatistics], ServerVersionNotSupportedExceptio
n
+ FullyQualifiedErrorId : 6565F6,Microsoft.Exchange.Management.Tasks.GetMobileDeviceStatistics
Hiya,
This script is only aimed at running against Exchange 2010 mailboxes. Exchange 2007 mailboxes don’t contain the useful information about ActiveSync devices that this script gathers. An alternative approach, such as using LogParser Studio would be required.
The good news is the latest iOS 6.1 bug doesn’t affect Exchange 2007 mailboxes.
Steve
Thanks for the response, However we have bunch of users whose mailboxes are migrated to Exchange 2010 and we are in process of migrating the rest. Now, where do you want me to run this script( On which server MBX or CAS etc) to get the users who has iphones with 6.1.
Looks like im getting this error for the mailboxes which are still 2007. The script is still running and looks like its going to take a while before it completes. May be it will be giving me the results for the mailboxes which are 2010?
It should be fine to run from any Exchange 2010 server and IIRC should be fine even with errors about Exchange 2007 mailboxes
Steve
Thanks everyone…
I get Export-iOSDeviceStatistics.ps1 is not digitally signed. The script will not execute on the system.
At line:1 char:33
+ .\Export-iOSDeviceStatistics.ps1 <<<< -OutputCSVFile .\output.csv
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
Right click on it and go into the properties, then you need to unblock the script. Then you willl be able to run it.
Steve,
Awesome script!! I might suggest That you change Username to PrimarySMTPaddress as if you needed to quickly build a distribution group you could easily create one off that. Also If you want I have created a full complete listing of all current iOSVersions listed below up to 6.1.
“508.11” = “2.2.1”;
“701.341” = “3.0”;
“701.400” = “3.0.1”;
“702.367” = “3.2”;
“702.405” = “3.2.1”;
“702.500” = “3.2.2”;
“703.144” = “3.1”;
“704.11” = “3.1.2”;
“705.18” = “3.1.3”;
“801.293” = “4.0”;
“801.306” = “4.0.1”;
“801.400” = “4.0.2”;
“802.117” = “4.1”;
“802.118” = “4.1”;
“803.148” = “4.2.1”;
“803.14800001” = “4.2.1”;
“805.128” = “4.2.5”;
“805.200” = “4.2.6”;
“805.303” = “4.2.7”;
“805.401” = “4.2.8”;
“805.501” = “4.2.9”;
“805.600” = “4.2.10”;
“806.190” = “4.3”;
“806.191” = “4.3”;
“807.4” = “4.3.1”;
“808.7” = “4.3.2”;
“808.8” = “4.3.2”;
“810.2” = “4.3.3”;
“810.3” = “4.3.3”;
“811.2” = “4.3.4”;
“812.1” = “4.3.5”;
“901.334” = “5.0”;
“901.405” = “5.0.1”;
“901.406” = “5.0.1”;
“902.176” = “5.1”;
“902.179” = “5.1”;
“902.206” = “5.1.1”;
“902.208” = “5.1.1”;
“1001.5376” = “6.0”;
“1001.403” = “6.0”;
“1001.405” = “6.0”;
“1001.523” = “6.0.1”;
“1001.525” = “6.0.1”;
“1001.551” = “6.0.2”;
“1002.142” = “6.1”;
“1002.143” = “6.1”;
“1002.141” = “6.1”;
Thanks,
Rob
Hi Rob,
You shouldn’t need any lines for iOS 6.0 or higher as that information is exposed without needing a mapping. The script only needs those lines for previous versions.
Steve
Pingback: iOS 6.0.1 update available including Exchange Meetings Bug Fix | Steve Goodman's Exchange Blog
Pingback: IOS 6 – problems with EAS « PCar's blog
Pingback: iOS6 issues with Exchange | EighTwOne (821)
This script will not work in larger environments due to PSRemoting limitation:
Sending data to a remote command failed with the following error message: The total data received from the remote clien
t exceeded allowed maximum. Allowed maximum is 524288000. For more information, see the about_Remote_Troubleshooting He
lp topic.
+ CategoryInfo : OperationStopped: (System.Manageme…pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe
motingTransportException
+ FullyQualifiedErrorId : JobFailure
How many users/connected devices?
Hi Steve, about 125,000 Users with about 20,000 devices
I’d suggest running through the first couple of lines (the Get-CASMailbox and Get-Mailbox) and seeing if it’s failing on either of those.
Might need to re do the code slightly to avoid needing get-mailbox, if that’s the one causing the issue.
I am having the same error, 30,000+ users. It is failing at the “get-mailbox” portion… I want to be able to export the e-mail address in the report however the only way I can find to get it is with the get-mailbox portion. I have also been experimenting with limiting the output to LastSuccessSync in the last 30 days, but this is generated when it gets the activesync statistics. It’s quandary I’ve been dealing with and would love to find a solution. I cant run Active Sync reports anymore… Argh….
Pingback: Exchange ActiveSync Issues with iOS6
Pingback: The UC Architects » Episode 10: We’ve Just Scratched The Surface
Pingback: Exporting iOS 6 and earlier device information | Steve Goodman’s Exchange Blog « JC’s Blog-O-Gibberish
Pingback: Exporting Exchange 2010 ActiveSync statistics for iOS Devices