Enable & Disable Active Sync For all user Exchange 2007 and 2010
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 |
you may get warning like this
if you have more than 1000 mailbox use the following
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 |
enjoy