Solved

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

Posted on 2010-11-29
7
767 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

829 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