Solved

Need a command to find out how many activesync users we have

Posted on 2010-11-29
7
765 Views
Last Modified: 2012-05-10
I am trying to find out exactly how many of our users that ActiveSync enabled on their account. I need this for an audit. I can't believe there is no powershell command to tell me this. I looked and could not find anything. Can someone help out here? Just want to export out all users that have this feature enabled.
0
Comment
Question by:osiexchange
  • 4
  • 3
7 Comments
 
LVL 76

Expert Comment

by:Alan Hardisty
ID: 34231717
What version of Exchange are you using?

If Exchange 2003 - there is no easy way.

If Exchange 2007 / 2010, please use the following:

Get-Mailbox | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity} | ft DeviceFriendlyName, Devicetype, DeviceUserAgent
0
 

Author Comment

by:osiexchange
ID: 34231734
Sorry. I forgot to mention that. We are using 2007. I will give it a try.
0
 
LVL 76

Expert Comment

by:Alan Hardisty
ID: 34231756
You can play with the variables at the end to get different information out like the username etc.  Shout if you need guidance.
0
Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

 

Author Comment

by:osiexchange
ID: 34232348
How would I get the user associated with the device? Is there any way to look at this particular feature to see whether it is enabled or disabled? The command you gave me looks at the device properties with the assumption that AS is enabled, but this is not always the case. When you disable this feature for a user, this device stays in the properties.
0
 
LVL 76

Accepted Solution

by:
Alan Hardisty earned 250 total points
ID: 34232437
Try the following:

Get-CASMailbox -Filter {hasactivesyncdevicepartnership - eq $true} | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity} | ft Identity, Devicetype

This will show you the device with a current partnership and the user associated with that partnership (active or not).

Get-CASMailbox -Filter {hasactivesyncdevicepartnership - eq $true} | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity} | ft Identity, Devicetype, LastSuccessSync

The above will show you the last time the device was synced with the server, so you can weed out ones that have not been in touch for a long time.

If you can't see the full username due to the size of the columns, change the line to:

Get-CASMailbox -Filter {hasactivesyncdevicepartnership - eq $true} | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity} | fl Identity, Devicetype, LastSuccessSync
0
 

Author Comment

by:osiexchange
ID: 34232688
Actually, the command get-CASMailbox all by itself worked great. That gave me what I needed.
0
 
LVL 76

Expert Comment

by:Alan Hardisty
ID: 34233141
Okay - glad you have what you need.

Do you need anything else?  If not - don't forget to close down the question.

Alan
0

Featured Post

The curse of the end user strikes again      

You’ve updated all your end user’s email signatures. Hooray! But guess what? They’re playing around with the HTML, adding stupid taglines and ruining the imagery. Find out how you can save your signatures from end users today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Find out what you should include to make the best professional email signature for your organization.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
This video discusses moving either the default database or any database to a new volume.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now