“常规”标签 

姓 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. day6 字符串

    重复输出字符串 # * 重复输出字符串 print("hello"*2) 字符串切片 # 字符串也拥有索引,和列表切片操作类似 print("helloworld&quo ...

  2. ecplise tomcat忽然出现404

    场景:之前用的好好的,eclipse可以启动,然后浏览器访问  localhost:8080  出现tomcat 404 页面 解决方法:删掉server ,重新建个 server

  3. POJ1163(简单的DP)

    题目链接:http://poj.org/problem?id=1163 Description 73 88 1 02 7 4 44 5 2 6 5 (Figure 1) Figure 1 shows ...

  4. Redis我想入门——启动

    nosql数据库出现到现在很多年了.笔者一直从事C/S模式的上开发.所以相对而言笔者只是听过却从来不知道他是什么东西.时代在变化,当年所有业务都放在一个War包的时代已经不在了.微服务已经成为了世界主 ...

  5. A1089. Insert or Merge

    According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and gr ...

  6. Codeforces Round #514 (Div. 2) D. Nature Reserve

    http://codeforces.com/contest/1059/problem/D 最大值: 最左下方和最右下方分别有一个点 r^2 - (r-1)^2 = (10^7)^2 maxr<0 ...

  7. WebClient 上传文件

    iis6.0 条件:必须启用WEBDAV  需要将要上传到的目录权限加上匿名登陆,而且必须在IIS上创建虚拟目录,将文件上传到虚拟目录才能成功,否则就会出现403禁止错误下面放上我测试好的代码. // ...

  8. P1169 [ZJOI2007]棋盘制作 && 悬线法

    P1169 [ZJOI2007]棋盘制作 给出一个 \(N * M\) 的 \(01\) 矩阵, 求最大的正方形和最大的矩形交错子矩阵 \(n , m \leq 2000\) 悬线法 悬线法可以求出给 ...

  9. exportfs命令

    exportfs命令:功能说明 :NFS共享管理 语法格式 exportfs [必要参数][选择参数][目录] 功能描述 exportfs 命令:用于管理NFS(Network File System ...

  10. python---web框架本质(2)

    目录 controllers //存放控制方法 models //存放模型方法 views //存放视图模板 index.html new.html show.html index.py //用户访问 ...