directory类提供了很多方法和对象

解决方案 »

  1.   

    Try
        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
      

  2.   

    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
      

  3.   

    asp.net 报错,不能创建或修改指定资源?怎么办?
      

  4.   

    你好,问一个LDAP的问题,下而的代码运等不了,就是OU要设成什么样的呢,
    我的机器名叫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