New LDAP User with Powershell -


i have challenge create new ldap users powershell script. have googled lot found no results...

this code users ldap...

    $authenticationtype  = [system.directoryservices.authenticationtypes]::serverbind $objsearcherroot = new-object system.directoryservices.directoryentry("ldap://***.local.com:777/ou=user,o=company", "uid=testuser,ou=system,o=company", "password" , $authenticationtype) $objsearcher = new-object system.directoryservices.directorysearcher  $objsearcher.sizelimit= 0 $objsearcher.pagesize = 1000 $objsearcher.searchroot = $objsearcherroot $objsearcher.filter = "cn=$cn" $result = $objsearcher.findall() 

my problem is, don't know how insert new ldap user (not active directory) nice if me... ;)

thanks

ldap not support "inserts", supports "adds". ldap client must create entry , transmit entry directory server using add request. server returns add result ldap client contains information success or failure of add request. so, check documentation information on transmitting add request directory server , interpreting subsequent response.

the ldap client must have permission add entry (a user in case). involves using bind request change authorization state of connection 1 permits adding entry @ designated place in directory information tree.

perhaps link help.


Comments