?
Solved

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

Posted on 2010-11-29
7
Medium Priority
?
771 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

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 1000 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses

765 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