Windows Mobiles can be configured for Active Sync. Active Sync is enabled for all users by Default in Exchange 2007. For Security reasons its recommended to disabled all users and enable only for the required users
Below power shell enabled and disabled Active for all the users in the exchange Organization
get-Mailbox -resultsize unlimited | set-CASMailbox -ActiveSyncEnabled:$False
get-Mailbox -resultsize unlimited | set-CASMailbox -ActiveSyncEnabled:$True
Below powershell command to enable and disable active sync for given set of users in the text file
Get-content C:\users.txt | set-CASMailbox -ActiveSyncEnabled:$True
Get-content C:\users.txt| set-CASMailbox -ActiveSyncEnabled:$True
Below powershell command to get the list of users who ActiveSync is Enabled and Disabled
Get-CASMailbox -ActiveSyncEnabled:$True
Get-CASMailbox -ActiveSyncEnabled:$False
To satisfy our needs I had to write this script, I run it once per week just to keep things in check. I add users who are granted EAS access to an AD group. This script will disable EAS for everyone momentarily, but I don’t really see it as a problem when it’s running at 4am on Sunday morning.
#Adding Exchange Snap In to execute Exchange CmdLets in this script
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
# Disable ActiveSync for ALL accounts because Microsoft hates you
get-Mailbox -ResultSize:unlimited | set-CASMailbox -ActiveSyncEnabled:$False -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
# Assign all members of the group to a dynamic array
$allUsers = Get-DistributionGroupMember -Identity ‘ActiveSync Users’
# Loop through the array
foreach ($member in $allUsers) {
# Set ActiveSync for each member of the array
$member | Set-CASMailbox –ActiveSyncEnabled $true
}
#Adding Exchange Snap In to execute Exchange CmdLets in this script
Sounds good. But where can I get this SnapIn? Thx.
Hi,
you need have Exchange management Shell installed
Regards,
Krishna