Preventing Access to OMA and Active Sync Using Security Groups in AD

本文介绍了一种通过脚本批量管理Exchange服务器上用户移动设备访问设置的方法。利用ADSIedit工具,管理员可以针对不同需求设置特定数值来启用或禁用Outlook Mobile Access等功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

本文是一些摘要,在设置Push mail的时候用到

 

“You see, the enable or disable values for these components are part of a users Active Directory properties contained in a value entitled msExchOmaAdminWirelessEnable which has a data type of integer, and can be viewed and modified by using ADSI edit, which also means that you can generate scripts to manipulate the values.”

 

In essence you can use a combination of Integer values from 0 to 7 to enabled or disable the following Mobile features for an individual users account:

  • Outlook Mobile Access (OMA)
  • User Initiated Synchronisation
  • Up-To-Date Notifications

 

The following table is a run down on the combinations that can be used to gain the desired results

 

Integer ValueOMAUser Initiated SynchronisationUp-to-date Notification
0EnabledEnabledEnabled
1EnabledEnabledDisabled
2DisabledEnabledEnabled
3DisabledEnabledDisabled
4EnabledDisabledEnabled
5EnabledDisabledDisabled
6DisabledDisabledEnabled
7DisabledDisabledDisabled

 

So, from know this, I thought “What if you have a security group that contains all the people that you wish to disable these values for, and then have a script which reads the group periodically and changes the values in ad”.

 

The following is what I came up with:

 

strADPath = “cn=Deny_AS,cn=Users, “

Set objRootDSE = GetObject(“LDAP://RootDSE“)
strDomainContext = objRootDSE.Get(“DefaultNamingContext”)

Set objGroup = GetObject (“LDAP://”& strADPath & strDomainContext)
objGroup.getInfo

Members = objGroup.GetEx(“member”)

For Each strMember in Members
  
set ObjUser = getObject(“LDAP://” & stMember)     

obJUser.msExchOmaAdminWirelessEnable = “7″
ObjUser.setinfo
 
Next


 

 

 

The above script reads the group membership of DENY_AS which is located in the Users container in Active Directory (you would need to create this group if you wish to use the script) and then changes the mobile settings on the account to match the Integer value which is set on the line obJUser.msExchOmaAdminWirelessEnable = “7″ (In my example it will disable all Mobile settings).

 

This script can be scheduled to run on either you Exchange server, member server or Domain Controller perhaps at an interval of 10 or 20 minutes.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值