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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting Attributes from LDAP

Status
Not open for further replies.

KeithCE

Programmer
Sep 6, 2002
52
US
Those of you who use the Active directory Browser utility (adsvw.exe), knows that you can select a user from members and select an attribute then click on the delete button to delete that attribute for that user. I have a VB app that does everything but deleting an attribut for a given user.

Does anyone know how this can be done using VB?

Thanks for any help.
 
This is a kixtart script I used to clear out an attribute. It should 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