http://www.c-sharpcorner.com/DirectoryServices.asp
解决方案 »
- WeifenLuo.WinFormsUI.Docking使用问题
- dataGrapView的数据源关联dataset、dataTable、dataview的问题
- 打开excel时,时灵时不灵为什么?
- 怎样在WinForm中显示时钟!!
- treeview nodes add重载函数怎么没有NAME属性的
- C#中委托的异步与直接用线程类用什么区别?
- 求救一条SQL查询语句
- C#打開foxpro dbf文件問題
- C# 引用类型疑问
- 学编程,是不是要做过项目,有项目给人看才能找到工作?
- 如何加密我的源码,和组件,对与SNK文件如何取得他的私有密码,和共有密码,并且如何使用,请指教
- 如何改变DATAGRID 最左边带导航三角形的那一列的宽度?
{
DirectoryEntry obDirEntry = null;
try
{
obDirEntry = new DirectoryEntry("WinNT://" + strDoamin);
DirectoryEntries entries = obDirEntry.Children;
DirectoryEntry obUser = entries.Add(strLogin, "User");
obUser.Properties["FullName"].Add("Amigo");
object obRet = obUser.Invoke("SetPassword", strPwd);
obUser.CommitChanges();
}
catch (Exception ex)
{
Trace.Warn(ex.Message);
}
}
http://www.c-sharpcorner.com/Code/2003/April/ListingADUsers.asp