• RSS
  • Twitter
  • FaceBook

Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Disable ActiveSync for some users

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2007] >> Mobility >> Disable ActiveSync for some users Page: [1]
Login
Message << Older Topic   Newer Topic >>
Disable ActiveSync for some users - 21.Jun.2011 12:08:16 PM   
rodrigez84

 

Posts: 1
Joined: 21.Jun.2011
Status: offline
Hi all,
I've a big exchange infrastructure with some thousands of users. I'd like to disable ActiveSync for all users which don't are already use with them devices. I've read more topic without find a solutions for my request. I seen that it's possible to make it by powershell command, but I've not experience on that..
Can you help me, please?

Tks a lot!
Post #: 1
RE: Disable ActiveSync for some users - 21.Jun.2011 12:30:28 PM   
John Weber

 

Posts: 1236
Joined: 20.Apr.2005
From: Portland, Oregon
Status: offline
Brute force method #1... I am sure there is a more elegant way to do this, but I KNOW this works....

#
write-host enable and disable EAS script
write-host
write-host Given a csv input file, this script will set the specified mailbox customattribute15
write-host to a value of "EAS" and then set the matching casmailbox to EAS = True.
write-host The last step is to read all system mailboxes and where the customattribute15 is NOT set to EAS,
write-host it marks the casmailbox to EAS disabled.
write-host
write-host
write-host
write-host If/when you change the input csv file, you will need
write-host to change the file name in the script.
write-host File names must be exact
write-host
write-host
write-host CSV input file must be a single column, with a header line of "identity"
write-host Look at the input.csv file for an example
write-host
write-host
#

import-csv "c:\scripts\disable enable eas\input.csv" | foreach {set-mailbox -identity $_.identity -customattribute15 EAS}

get-mailbox | where {$_.customattribute15 -eq "EAS"} | set-casmailbox -ActiveSyncEnabled $true

get-mailbox | where {$_.customattribute15 -ne "EAS"} | set-casmailbox -activesyncenabled $false

_____________________________

John Weber [Lync MVP] http://tsoorad.blogspot.com

(in reply to rodrigez84)
Post #: 2
RE: Disable ActiveSync for some users - 23.Jun.2011 10:59:07 AM   
guyforkes

 

Posts: 15
Joined: 24.Mar.2011
Status: offline
Rodriguez84, have you found a solution yet? If not, I have 2 simple scripts that can do the job for you.

(in reply to rodrigez84)
Post #: 3
RE: Disable ActiveSync for some users - 23.Jun.2011 11:14:52 AM   
John Weber

 

Posts: 1236
Joined: 20.Apr.2005
From: Portland, Oregon
Status: offline
Post 'em!

_____________________________

John Weber [Lync MVP] http://tsoorad.blogspot.com

(in reply to guyforkes)
Post #: 4
RE: Disable ActiveSync for some users - 23.Jun.2011 11:46:41 AM   
guyforkes

 

Posts: 15
Joined: 24.Mar.2011
Status: offline
Sorry, it's one script not two, here goes....

get-casmailbox -resultsize unlimited | where {$_.hasactivesyncdevicepartnership -eq $false} | where  {$_.ActiveSyncEnabled -eq $true} |set-casmailbox -ActiveSyncEnabled $false

(in reply to John Weber)
Post #: 5
RE: Disable ActiveSync for some users - 23.Jun.2011 11:57:11 AM   
de.blackman

 

Posts: 3542
Joined: 4.Apr.2005
From: Toronto, Canada
Status: offline
I just did this for a client but instead of disabling activesync on the mailbox, we are using TMG to publish ActiveSync to only a specified group we created in AD. This way who ever needs activesync access, just add them to the group. By default when user mailboxes are created, activesync is enabled! So if you want to use your method, you have to remember to disable activesync everytime a mailbox is created. My client has over 20,000 users and mailboxes are not centrally created so management would be almost impossible! At least with the group method, controlled access to activesync is available.

Do you have TMG or ISA?

_____________________________

Ibrahim Benna - Microsoft Exchange MVP
Forum Moderator
Navantis
@IbrahimBenna

(in reply to guyforkes)
Post #: 6
RE: Disable ActiveSync for some users - 23.Jun.2011 12:29:14 PM   
guyforkes

 

Posts: 15
Joined: 24.Mar.2011
Status: offline
De Blackman, we have ISA. Your method  makes sense, I'll play wth it sometime. For anyone not using your method, you can use this script to create users, which disables ActiveSync for all new mailboxes:

import-csv 'c:\newusers.csv' | foreach {enable-mailbox -Identity $_.Identity} | set-casmailbox -ActiveSyncenabled $false.

(You add other parameters for your database etc of course)

(in reply to de.blackman)
Post #: 7

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2007] >> Mobility >> Disable ActiveSync for some users Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Follow TechGenix on Twitter