PowerShell: Identifying ActiveSync Devices with Get-ActiveSyncDevice for Exchange 2010

Exchange PowerShell

Having recently started working with a new client and sorting out some Exchange 2010 problems, I wanted to identify what sort of mobile devices they had and more specifically what version of iOS any of their iPhones/iPads were running due to the issues that iOS 6.1 caused (see link iOS 6.1: Excess Exchange activity after accepting an exception to recurring calendar event)

To do this i used the command:

Get-ActiveSyncDevice | select devicetype, deviceos, deviceuseragent

Get-ActiveSyncDevice | select devicetype, deviceos, deviceuseragentTo narrow the search down further to see only the devices running iOS 6.1 i used the following command:

Get-ActiveSyncDevice | where {$_.deviceos -match “iOS 6.1 “} | select devicetype, deviceos, deviceuseragent

Get-ActiveSyncDevice | where {$_.deviceos -match "iOS 6.1 "} | select userdisplayname,deviceosThen finally to determine who owns the iOS 6.1 devices i used the following command:

Get-ActiveSyncDevice | where {$_.deviceos -match “iOS 6.1 10B14*”} | select userdisplayname,deviceos

A list of properties that can be obtained from the Get-ActiveSyncDevice PowerShell command can be found below:

RunspaceId
FriendlyName
DeviceId
DeviceImei
DeviceMobileOperator
DeviceOS
DeviceOSLanguage
DeviceTelephoneNumber
DeviceType
DeviceUserAgent
DeviceModel
FirstSyncTime
UserDisplayName
DeviceAccessState
DeviceAccessStateReason
DeviceAccessControlRule
DeviceActiveSyncVersion
AdminDisplayName
ExchangeVersion
Name
DistinguishedName
Identity
Guid
ObjectCategory
ObjectClass
WhenChanged
WhenCreated
WhenChangedUTC
WhenCreatedUTC
OrganizationId
OriginatingServer
IsValid




Related Posts:

1. PowerShell: Get-ADUser to retrieve logon scripts and home directories – Part 1

2. PowerShell: Get-ADUser to retrieve logon scripts and home directories – Part 2

3. How to install Exchange 2010 (SP3) on Windows Server 2012

4. Exchange PowerShell: How to find users hidden from the Global Address List

5. How to install Exchange 2013 (SP1) on Windows Server 2012 R2

If you found this post useful, please share!

    Related Posts

    2 thoughts on “PowerShell: Identifying ActiveSync Devices with Get-ActiveSyncDevice for Exchange 2010

    1. Jay

      What if I want to add some AD attributes to my output such as Department or Location for each of the users while getting each of their device info, how could I do that any suggestions?

      Thanks.

      Reply
      1. OxfordSBSguy.com

        Hi Jay, to get devices per Department or Location I would try to use something like get-aduser where department matches finance, and then try export the results into a variable, you should then be able to use the variable in the Get-ActiveSyncDevice | where {$_.name -match variable} | select name, devicetype, deviceos, deviceuseragent. You may need to pop the command in a loop to iterate through each name in the variable.

        If you work it out please post your command as I would be interested to see how you achieved it.
        Cheers,
        Carl

        Reply

    Leave a Reply

    Your email address will not be published. Required fields are marked *