ActiveSync Inventory

ActiveSync Inventory A part of a project I am working on I needed to perform an ActiveSync Inventory for all mobile devices that were deployed in the infrastructure, while there plenty of scripts to perform a detailed inventory of mobile devices I needed a quick way to have:

  • Model of the ActiveSync Device
  • Name of the Device
  • Device OS Version
  • User owning the device

Exchange Management Shell integrates a built-in cmdlet that can be used to retrieve a list of all the ActiveSync devices which are currently configured used, to retrieve the information I needed and perform an ActiveSync Inventory I just ran the following command:

Get-ActiveSyncDevice | Select-Object DeviceModel,FriendlyName,DeviceOS,UserDisplayName | Sort-Object DeviceOS | Format-Table -autosize -wrap

The above command will display an output similar to the following:

DeviceModel FriendlyName     DeviceOS          UserDisplayName
----------- ------------     --------          ---------------
iPhone3C1   Black iPhone 4   iOS 6.0.1 10A523  helocheck.com/Lab Users/Lab User 1 
iPhone3C1   Black iPhone 4   iOS 6.1.2 10B146  helocheck.com/Lab Users/Lab User 2
iPad2C5     Black iPad mini  iOS 6.1.2 10B146  helocheck.com/Lab Users/Lab User 3
iPhone3C1   Black iPhone 4   iOS 6.1.2 10B146  helocheck.com/Lab Users/Lab User 4
iPhone3C1   Black iPhone 4   iOS 6.1.2 10B146  helocheck.com/Lab Users/Lab User 5
iPad2C2     Black iPad 2     iOS 6.1.3 10B329  helocheck.com/Lab Users/Lab User 6
iPhone3C1   Black iPhone 4   iOS 7.0 11A465    helocheck.com/Lab Users/Lab User 7
iPhone3C1   Black iPhone 4   iOS 7.0.2 11A501  helocheck.com/Lab Users/Lab User 8
iPhone4C1   Black iPhone 4S  iOS 7.0.2 11A501  helocheck.com/Lab Users/Lab User 9
iPhone4C1   Black iPhone 4S  iOS 7.0.2 11A501  helocheck.com/Lab Users/Lab User 10
iPhone3C1   Black iPhone 4   iOS 7.0.2 11A501  helocheck.com/Lab Users/Lab User 11
iPhone3C1   Black iPhone 4   iOS 7.0.4 11B554a helocheck.com/Lab Users/Lab User 12
iPad2C2     Black iPad 2     iOS 7.0.4 11B554a helocheck.com/Lab Users/Lab User 13
iPhone4C1   Black iPhone 4S  iOS 7.0.4 11B554a helocheck.com/Lab Users/Lab User 14
iPhone3C1   Black iPhone 4   iOS 7.0.4 11B554a helocheck.com/Lab Users/Lab User 15
iPhone4C1   Black iPhone 4S  iOS 7.0.4 11B554a helocheck.com/Lab Users/Lab User 16
iPhone5C4   iPhone 5c        iOS 7.0.4 11B554a helocheck.com/Lab Users/Lab User 17
iPhone5C4   iPhone 5c        iOS 7.0.5 11B601  helocheck.com/Lab Users/Lab User 18
iPhone5C4   iPhone 5c        iOS 7.0.6 11B651  helocheck.com/Lab Users/Lab User 19
iPhone5C2   iPhone 5         iOS 7.0.6 11B651  helocheck.com/Lab Users/Lab User 20

That is exactly the kind of ActiveSync Inventory that I was looking for but having that on screen is not very practical if you need to use the information in a document or proposal, performing a slight change to the code you can easily produce a CSV file which can be easily edited with Excel:

Get-ActiveSyncDevice | Select-Object DeviceModel,FriendlyName,DeviceOS,UserDisplayName | Sort-Object DeviceOS | Export-CSV C:HeloCheckScriptsActiveSyncInventory.csv

I hope you enjoyed the article and found it useful, let me know what you think with a comment below and subscribe to RSS so to be notified when new content is published!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s