惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 胖子

Markdown Reader 插件改造 Visual Studio Code 使用心得 Philips K700 使用感受 XML、二进制、SOAP的序列化 清除UTF-8文件的BOM头 powershell 相关 FireFox在windows2003的操作系统支持Windows Media Player插件 关于javascript编码url的中文参数 [转]IIS 6.0中配置HTTP Gzip压缩 数码相机在windows2003下的问题 MyGeneration连接MySql数据库的解决办法 SmartPhone下解决rm、rmvb等格式电影播放的方案(参考意见) 读写类似web.config的xml格式文件 - 胖子 - 博客园 Awstats 安装使用说明 关于博客园的聚合问题 关于保持页面滚动条位置的一些体会 胖子的故事(四) 胖子的故事(三) 胖子的故事(二)
一个简单的操作活动目录的类(ADHelper)
胖子 · 2006-07-05 · via 博客园 - 胖子

工作关系,用了vb.net语法。代码中注释写的比较详细,直接贴代码上去了。
注意:别忘了添加System.DirectoryServices.dll的引用

'-----------------------------------------------------------------------------
'
 说明:操作AD用到了两种协议,WinNT和LDAP
'
'
       WinNT —— 可以以较高的权限进行操作,但可操作的对象比较少。
'
                  一般用来添加(删除)用户和组、修改密码、添加用户到组。
'
'
       LDAP ——  以树形结构对AD进行访问,操作对象多,且更为灵活。
'
                  但权限方面不如WinNT开放。
'
'
-----------------------------------------------------------------------------

Imports System
Imports System.DirectoryServices

''' -----------------------------------------------------------------------------
'
'' Project     : ADService
'
'' Class     : ADHelper
'
'' 
'
'' -----------------------------------------------------------------------------
'
'' <summary>
'
'' 一个简单的操作活动目录的类
'
'' </summary>
'
'' -----------------------------------------------------------------------------
Public Class ADHelper

私有成员变量

帐户选项

构造函数

公共接口

私有方法

End Class