首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

取AD用户跟OU属性字段名称

2013-09-14 
取AD用户和OU属性字段名称??????????????????? {??????????????????????? foreach (object p in res.Prope

取AD用户和OU属性字段名称
??????????????????? {
??????????????????????? foreach (object p in res.Properties)
??????????????????????? {
??????????????????????????? Response.Write(((System.DirectoryServices.PropertyValueCollection)(p)).PropertyName.ToString() + "=========/n" + ((System.DirectoryServices.PropertyValueCollection)(p)).Value);
??????????????????????? }
??????????????????? }

??????????????????? Response.Write("---------------------");
??????????????????? if (res.Name.Substring(0, 3) == "OU=")
??????????????????? {
??????????????????????? foreach (object p in res.Properties)
??????????????????????? {
??????????????????????????? Response.Write(((System.DirectoryServices.PropertyValueCollection)(p)).PropertyName.ToString() + "==============/n"+((System.DirectoryServices.PropertyValueCollection)(p)).Value);
??????????????????????? }
??????????????????? }

?

可以得到非常全面的AD属性

热点排行