Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting attributes

Status
Not open for further replies.

KeithCE

Programmer
Sep 6, 2002
52
0
0
US
I have created a vb application that can pretty much do anything in LDAP. Create users, set attributes ect..

The only thing I can not figure out is how to delete an attribute from a user.

Thanks for any help.
 
Hey, is it that you don't know the command or get an error when doing so.. I had the same problem.. You have to make sure you don't violate your objectclass when attempting to delete an attribute.

Hymatron
 
This is a kixtart script I've used to clear an attribute. I can be easily converted to vb.

Code:
$objou = GetObject("LDAP://ou=Staff,ou=Domain Users,dc=burlington,dc=org")
for each $user in $objou
  $user.PutEX(1, "Description", "")
  $user.SetInfo
  ? $user.displayname+" "+@error+" "+@serror
next
$objou=""
quit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top