directory类提供了很多方法和对象
解决方案 »
- 操作word时页面横向显示,应该怎么做?
- asp.net程序里提供网上发短信
- asp.net Form 认证异常
- 请问C#如何截取字符串中的一些字符?象ASP中的Left()函数。多谢
- 如何在ASP.NET中设置一个左右框架呢?就像CSDN一样。
- 如何在C#代码里获得提交表单的值
- About alert() 请指点!
- asp.net也不是很好用啊,最近看了Sybase的EAServer,PBWF觉得很不错
- 問一個菜問題,DataGrid是否可以在某一固定日期只能對數據庫中其中幾個字段作修改,到了另外一個時間,可以對另外幾個字段作修改。
- 请教:用javascript怎样连接数据库?
- 问个问题,如果掌握了sql语言,那么commandbuilder还有用吗? (是不是很菜的问题?)
- 菜鸟的呼声,最近公司要做网页,有的是时间,我想用ASP做,听说ASP功能强
Dim de As New DirectoryEntry("LDAP://CN=Users,DC=fabrikam,DC=com")
Dim newGroup As DirectoryEntry = de.Children.Add("CN=Sales", "group")
newGroup.CommitChanges()
Dim newContact As DirectoryEntry = de.Children.Add("CN=New Contact", "contact")
newContact.CommitChanges()
Dim de01 As New DirectoryEntry("LDAP://CN=Computers,DC=fabrikam,DC=com")
Dim newComputer As DirectoryEntry = de01.Children.Add("CN=New Computer", "computer")
newComputer.CommitChanges()
Catch Exception1 As ExceptionEnd Try
Dim ent As New DirectoryEntry("LDAP://Fabrikam/CN=My Username,CN=Users,DC=Fabrikam,DC=com")
ent.Properties("otherTelephone").Add("(425) 523 1462")
ent.CommitChanges()
Catch Exception1 As ExceptionEnd Try
我的机器名叫hxy.wyoo.com
域名是wyoo.com
有一个用户是a
现在想改a用户的信息
Sub Main()
'Bind to a user就是这下一句不行。
Set usr = GetObject("LDAP://CN=a,OU=DSys,DC=wyoo,DC=com")
usr.Put "givenName", "Jane"
usr.Put "sn", "Johnson" usr.Put "otherTelephone", Array("425 844 1234", "425 924 4321")
usr.SetInfo
End Sub