• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 64
  • Last Modified:

Get all users activesync device versions

We need to use powershell to query exchange and get all users, the activesync device types, and the version they are on.  It needs to be spit out into a CSV or Excel file. Can someone help me with this?

Ex:
jsmith | iPhone | iPhone,6.1
smith | Android | SamsungGalaxy10.1
0
cmb991
Asked:
cmb991
  • 4
  • 4
1 Solution
 
Sajen JoseCommented:
You can probably use the below cmdlet and build a script around it by replacing the USERNAME using a foreach loop...  

Get-ActiveSyncDeviceStatistics -Mailbox USERNAME | format-table UserDisplayName, DeviceType, DeviceUserAgent, DeviceOS

You can find more information here -> https://technet.microsoft.com/en-us/library/dd335068(v=exchg.160).aspx
0
 
cmb991Author Commented:
Thanks, Ill try now, but I stink at writing scripts.  I'll try my best.  If I can't get it, can you help me?
0
 
Sajen JoseCommented:
sure, I don't have access to an Exchange Environment for testing out the scripts, however you can refer online (for e.g. -> https://www.red-gate.com/simple-talk/sysadmin/exchange/identifying-exchange-activesync-users-with-powershell/), this will give you a good information to start building out the script by yourself :)
0
Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

 
cmb991Author Commented:
I still can't get it to work.
0
 
Sajen JoseCommented:
Are you able to get it working for a single user with the above cmdlet? Are there any error messages coming up...
0
 
cmb991Author Commented:
Single user works fine.  It’s getting a loop in to do every mailbox i’m stuck on
0
 
cmb991Author Commented:
Can someone help me with getting this to work to pull every email address, their device manufacture, and device version?  Also needs to do non-disabled ad accounts.
0
 
Sajen JoseCommented:
$Mailboxes = Get-Mailbox -ResultSize unlimited

$Devices = $Mailboxes | %{Get-ActiveSyncDeviceStatistics -Mailbox $_.Identity}

$Devices | Select-Object UserDisplayName, DeviceType, DeviceUserAgent, DeviceOS | Export-Csv -NoTypeInformation -Path "Devicedetails.csv"
0
 
Seth SimmonsSr. Systems AdministratorCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Sajen Jose (https:#a42432439)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

seth2740
Experts-Exchange Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now