“常规”标签 

姓 Sn 
名 Givename 
英文缩写 Initials 
显示名称 displayName 
描述 Description 
办公室 physicalDeliveryOfficeName  
电话号码 telephoneNumber 
电话号码:其它 otherTelephone 多个以英文分号分隔 
电子邮件 Mail 
网页 wWWHomePage 
网页:其它 url 多个以英文分号分隔

“地址”标签 

国家/地区 C 如:中国CN,英国GB 
省/自治区 St  
市/县 L 
街道 streetAddress 
邮政信箱 postOfficeBox 
邮政编码 postalCode

“帐户”标签 

用户登录名 userPrincipalName 形如:pccai1983@hotmail.com 
用户登录名(以前版本) sAMAccountName 形如:S1 
登录时间 logonHours  
登录到 userWorkstations 多个以英文逗号分隔 
用户帐户控制 userAccountControl (启用:512,禁用:514, 密码永不过期:66048) 
帐户过期 accountExpires

“配置文件”标签

配置文件路径 profilePath 
登录脚本 scriptPath 
主文件夹:本地路径 homeDirectory 
连接 homeDrive 
到 homeDirectory

“电话”标签

家庭电话 homePhone (若是其它,在前面加other。) 
寻呼机 Pager 如:otherhomePhone。 
移动电话 mobile 若多个以英文分号分隔。 
传真 FacsimileTelephoneNumber  
IP电话 ipPhone 
注释 Info

“单位”标签

职务 Title 
部门 Department 
公司 Company

“隶属于”标签

隶属于  memberOf  用户组的DN不需使用引号, 多个用分号分隔  
“拨入”标签 远程访问权限(拨入或VPN) msNPAllowDialin 
允许访问 值:TRUE 
拒绝访问 值:FALSE 
回拨选项 msRADIUSServiceType 
由呼叫方设置或回拨到 值:4 
总是回拨到 msRADIUSCallbackNumber 

名:GivenName

属性

显示名称

属性名称

First Name

givenName

Last Name

sn

Initials

initials

Description

description

Office

physicalDeliveryOfficeName

Telephone Number

telephoneNumber

Telephone: Other

otherTelephone

E-Mail

mail

Web Page

wwwHomePage

Web Page: Other

url

帐号属性:

显示名称

属性名称

UserLogon Name

userPrincipalName

User logon name (pre-Windows 2000)

sAMAccountname

Logon Hours

logonHours

Log On To

logonWorkstation

Account is locked out

userAccountControl

User must change password at next logon

pwdLastSet

User cannot change password

N/A

Other Account Options

userAccountControl

Account Expires

accountExpires

地址属性

显示名称

属性名称

Street

streetAddress

P.O.Box

postOfficeBox

City

l

State/Province

st

Zip/Postal Code

postalCode

Country/Region

c, co, and countryCode

成员属性

显示名称

属性名称

Member of

memberOf

Set Primary Group

primaryGroupID

组织属性

显示名称

属性名称

Title

title

Department

department

Company

company

Manager:Name

manager

Direct Reports

directReports

外型属性

显示名称

属性名称

Profile Path

profilePath

Logon Script

scriptPath

Home Folder: Local Path

homeDirectory

Home Folder: Connect

homeDrive

Home Folder: To

homeDirectory

电话相关属性

显示名称

属性名称

Home

telephoneNumber

Home: Other

otherTelephone

Pager

pager

Pager: Other

pagerOther

Mobile

mobile

Mobile: Other

otherMobile

Fax

facsimileTelephoneNumber

Fax: Other

otherFacsimileTelephoneNumber

IP phone

ipPhone

IP phone: Other

otherIpPhone

Notes

info

C#操作AD例子:

GetUserEntry

         public static DirectoryEntry GetUserEntryByAccount(DirectoryEntry entry, string account)

                   {

                            DirectorySearcher searcher = new DirectorySearcher(entry);

                            searcher.Filter = "(&(objectClass=user)(SAMAccountName=" + account + "))";

                            SearchResult result = searcher.FindOne();

                            entry.Close();

                            if (result != null)

                            {

                                     return result.GetDirectoryEntry();

                            }

                            return null;

                   }

Set Property

                   public static void SetProperty(DirectoryEntry entry, string propertyName, string propertyValue)

                   {

                            if (entry.Properties.Contains(propertyName))

                            {

                                     if (string.IsNullOrEmpty(propertyValue))

                                     {

                                               object o = entry.Properties[propertyName].Value;

                                               entry.Properties[propertyName].Remove(o);

                                     }

                                     else

                                     {

                                               entry.Properties[propertyName][] = propertyValue;

                                     }

                            }

                            else

                            {

                                     if (string.IsNullOrEmpty(propertyValue))

                                     {

                                               return;

                                     }

                                     entry.Properties[propertyName].Add(propertyValue);

                            }

                   }

Get Property

         public static string GetProperty(DirectoryEntry entry, string propertyName)

                   {

                            if (entry.Properties.Contains(propertyName))

                            {

                                     return entry.Properties[propertyName].Value.ToString();

                            }

                            else

                            {

                                     return string.Empty;

                            }

                   }

文档下载

源代码下载(代码马上就来)

AD域相关的属性和C#操作AD域的更多相关文章

  1. AD域 根据 用户属性userAccountControl 来判断用户禁用属性

    参考:https://support.microsoft.com/zh-cn/help/305144/how-to-use-the-useraccountcontrol-flags-to-manipu ...

  2. 域知识深入学习二:建立AD DS域

    2.1 建立AD DS域前的准备工作 先安装一台服务器,然后将其升级(promote)为域控 2.1.1 选择适当的DNS域名 AD DS域名采用DNS的架构与命名方式 2.1.2 准备好一台支持AD ...

  3. JAVA使用Ldap操作AD域

    项目上遇到的需要在集成 操作域用户的信息的功能,第一次接触ad域,因为不了解而且网上其他介绍不明确,比较费时,这里记录下. 说明: (1). 特别注意:Java操作查询域用户信息获取到的数据和域管理员 ...

  4. AD 域服务简介(三)- Java 对 AD 域用户的增删改查操作

    博客地址:http://www.moonxy.com 关于AD 域服务器搭建及其使用,请参阅:AD 域服务简介(一) - 基于 LDAP 的 AD 域服务器搭建及其使用 Java 获取 AD 域用户, ...

  5. 清除掉AD的相关属性!

    今天有朋友问我怎么清除掉AD 的相关属性,由于他们的用户都设置了登录到属性,这样我们的用户就仅仅能登陆他须要设置的计算机.对于兴许规则的变更的时候,我们的管理员配置起来就比較复杂.他须要非常长的时间去 ...

  6. [原创]java WEB学习笔记15:域对象的属性操作(pageContext,request,session,application) 及 请求的重定向和转发

    本博客为原创:综合 尚硅谷(http://www.atguigu.com)的系统教程(深表感谢)和 网络上的现有资源(博客,文档,图书等),资源的出处我会标明 本博客的目的:①总结自己的学习过程,相当 ...

  7. 【转】 如何利用C#代码来进行操作AD

    要用代码访问 Active Directory域服务,需引用System.DirectoryServices命名空间,该命名空间包含两个组件类,DirectoryEntry和 DirectorySea ...

  8. C#操作AD及Exchange Server总结

    C#操作AD及Exchange Server总结 这篇博客的目的:根据亲身项目经历,总结对AD及Exchange Server的操作,包括新建AD用户,设置密码,为AD用户创建邮箱等. 本文完全原创, ...

  9. C#操作AD及Exchange Server总结(一)

    这篇博客的目的:根据亲身项目经历,总结对AD及Exchange Server的操作,包括新建AD用户,设置密码,为AD用户创建邮箱等. 本文完全原创,转载请说明出处,希望对大家有用. 文档目录: 测试 ...

随机推荐

  1. Hdoj 1009.FatMouse' Trade 题解

    Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding th ...

  2. 洛谷 P1462 通往奥格瑞玛的道路 解题报告

    P1462 通往奥格瑞玛的道路 题目背景 在艾泽拉斯大陆上有一位名叫歪嘴哦的神奇术士,他是部落的中坚力量 有一天他醒来后发现自己居然到了联盟的主城暴风城 在被众多联盟的士兵攻击后,他决定逃回自己的家乡 ...

  3. 全面解析Java类加载器

    深入理解和探究Java类加载机制---- 1.java.lang.ClassLoader类介绍 java.lang.ClassLoader类的基本职责就是根据一个指定的类的名称,找到或者生成其对应的字 ...

  4. 猜数字小游戏,很naive......

    这里用到了随机数生成器以及ctime #include <cstdio> #include <cstdlib> #include <ctime> #include ...

  5. CF 468B Two Sets

    题意: 给定n个正整数与a,b两个集合,求一种方案使得这n个数恰好被分在这两个集合中且集合中无多余的数且若x在a中则A-x在a中,若x在b中则B-x在b中. 题意理解了我好半天... 解法1:并查集. ...

  6. A1070. Mooncake

    Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types ...

  7. Vector 是线程安全的,是不是在多线程下操作Vector就可以不用加Synchronized

    如标题一样,如果之前让我回答,我会说,是的,在多线程的环境下操作Vector,不需要加Synchronized. 但是我今天无意间看到一篇文章,我才发现我之前的想法是错误的,这篇文章的地址: http ...

  8. react中跨域请求天气预报接口数据

    背景故事:同源策略(Same origin policy)是一种约定,它是浏览器最核心也最基本的安全功能, 如果缺少了同源策略,则浏览器的正常功能可能都会受到影响.可以说Web是构建在同源策略基础之上 ...

  9. shell 备份代码

    #!/bin/sh # 备份代码 basedir=/data/backup www_src=$basedir/$(date +%F_$H) [ ! -d "$www_src" ] ...

  10. 2636652995 揭秘骗子qq

    3042952272636652995755610392020068008这是个骗子群526875508,群里都是群主的小号,付钱之后不给东西,还在群里维护骗子的利益,很明显了.都是骗子小号了,付完整 ...