MsExchange Blog Spot Telnet25

June 28, 2011

Enable & Disable ActiveSync For Exchange 2007 and 2010 Users

Filed under: General — telnet25 @ 7:59 pm

Issue:  Your company asked Default behavior for new user mailbox creation , ActiveSync future to be disabled. You find out by default every MB user has ActiveSync future turned on. If you have some of your users wished to use ActiveSync while majority of the users are disabled the out the box Exchange configuration nor GUI will come into rescue but PowerShell.

See fallowing KB articles for disabling ActiveSync ,

This topic describes how to disable Microsoft Exchange ActiveSync. When you disable Exchange ActiveSync on a computer that is running Microsoft Exchange Server 2007 that has the Client Access server role installed, you disable the application pool that Exchange ActiveSync uses. An application pool is a group of processes that Internet Information Services (IIS) uses to perform a task.

To see ActiveSync Enabled users run fallowing PS (  Get is harmless, as the PS does not make any changes, you need to watch out for set function (-: )

Get-CASMailbox -resultSize unlimited -filter {activeSyncEnabled -eq $true}


Disable Active Sync for All Users

get-Mailbox | set-CASMailbox -ActiveSyncEnabled:$False



Enable ActiveSync for All Users

get-Mailbox | set-CASMailbox -ActiveSyncEnabled:$True


Now we will disable it for Everyone but for some selected users with fallowing Script

Get-Mailbox | set-CASMailbox -ActiveSyncEnabled:$True | Get-content C:\ActiveSyncEnabledUsers.txt



On the C drive of my server I have created simple TXT file for the output



 last one

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



Oz Casey, Dedeal

MCSE 2003, M+, S+, MCDST
Security+, Project +, Server + (Blog) (Blog)


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

Create a free website or blog at

%d bloggers like this: