Udostępnij za pośrednictwem


List Mobile Devices In Exchange 2013


Premier Field Engineers Abdul Rafey Mohammed and Daya Patil walk us though how to easily list ActiveSync devices in Exchange 2013. 


In our jobs as Premier Field Engineers supporting Exchange 2013, we found that customers often struggle with listing out active mobile devices in their environment and use the information for Business Analysis or Troubleshooting purposes.

Yes, there is a cmdlet Get-MobileDeviceStatistics but more often than not it takes a long time to list all the devices, especially in Exchange organizations spread across multiple datacenters.  Running Get-MobileDeviceStatistics in a large global organization will take an exceedingly long time.  This is due to accessing data remotely over the network, the intent of this post is to access data locally as much as possible. 

Here, we present an easy way to get this information individually from each Mailbox Server (or Mailbox Servers belonging to same datacenter if you tweak the command a little bit) from the local datacenter so that we get the information we need quicker and allows us to collate the information later on – basically divide and conquer!

So, here we go! 

The output against each Mailbox Server can found via following set of cmdlets run in Exchange 2013 PowerShell, preferably run from the same site as the Mailbox Server:

$Mbx = Get-CASMailbox -Filter {HasActiveSyncDevicePartnership -Eq $true -And ServerName -eq "<Mailbox Server Name>"}

ForEach ($MB in $Mbx)

{

Get-MobileDeviceStatistics -Mailbox $MB.Identity | Select-Object Identity, Lastsyncattempttime, LastSuccessSync, Devicetype, DeviceOS, DeviceFriendlyname, Status, DeviceAccessState | Export-CSV “<path>\<outputfilename>.csv” -NoTypeInformation –Append

}

Once the output files are obtained from all Mailbox Servers, they can be manually merged to get the consolidated output.

Hope this is useful for all of you looking for this information.

Daya Patil & Abdul Rafey Mohammed


Published by MSPFE editor Rhoderick Milne at 39,000 feet somewhere over Manitoba.


Comments