vba - How does PutEx work? -
i have translate code vb c# , can't quite grasp how putex works, though have read msdn doc. in case have following:
set objuser = getobject("ldap://" + mypathvariable) objuser.putex 1, "company", 0 could explain me line exactly?
what understood first parameter action (in case ads_property_clear), second property name, , third property value. line clear objuser of data , append these values?
if such case, why wouldn't use put instead? 
iads::put() can set value, cannot clear value, meaning can use method set different value, not remove value entirely (i.e. set attribute null). latter must use iads::putex().
more detailed explanation scripting guy blog:
next use these 2 lines of code erase ken myer’s telephone number:
objuser.putex ads_property_clear, "telephonenumber", 0 objuser.setinfoas can see, call
putexmethod , pass 3 parameters: 1) the constantads_property_clearwhich, again, indicates operation want perform; 2)telephonenumber, attribute want clear; , 3)0, parameter required time clear attribute. callsetinfomethod write changes active directory. if re-run script retrieves list of users have phone numbers, ken myer no longer appear in list. that’s because no longer has phone number, not 1 consisting of empty string.
Comments
Post a Comment