Comments on: Enabeling and Disabiling Active Sync for the user/2009/10/04/enabiling-and-disabiling-active-sync-for-the-user/Microsoft Exchange & OWA Resources, Information - Optimize, Support, Manage | How-To | Guides | Reference | AdminMon, 12 Jul 2010 20:03:28 +0000hourly1http://wordpress.com/By: Krishna/2009/10/04/enabiling-and-disabiling-active-sync-for-the-user/#comment-133Mon, 12 Jul 2010 20:03:28 +0000/?p=677#comment-133In reply to Stephan.

Hi,
you need have Exchange management Shell installed

Regards,
Krishna

]]>
By: Stephan/2009/10/04/enabiling-and-disabiling-active-sync-for-the-user/#comment-132Mon, 12 Jul 2010 14:12:25 +0000/?p=677#comment-132#Adding Exchange Snap In to execute Exchange CmdLets in this script

Sounds good. But where can I get this SnapIn? Thx.

]]>
By: Aaron Anderson/2009/10/04/enabiling-and-disabiling-active-sync-for-the-user/#comment-98Fri, 09 Apr 2010 15:13:22 +0000/?p=677#comment-98To 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
}

]]>