> > <code> > import active_directory as ad > > me = ad.find_user () > me.PutEx (1, "telephoneNumber", "IRRELEVANT") > > </code> > > This should clear the telephoneNumber field; the first > param to PutEx is one of: Clear, Update, Append, Delete; > the second param is the field name; the third is usually > the value >
This is exactly what I was looking for. I did a bit of searching and found the typical values for the first parameter: ADS_PROPERTY_CLEAR = 1 ADS_PROPERTY_UPDATE = 2 ADS_PROPERTY_APPEND = 3 ADS_PROPERTY_DELETE = 4 from: http://www.winvistatips.com/changing-ad-profile-paths-t750970.html Incidentally, it wasn't clear from your code fragment whether > you realised, but you can usually set AD fields directly by > referring to them as attributes: > > me.telephoneNumber = "504" > > I had noticed that in your module, but In my instance, I will actually pass a dictionary. <code> me.set(**details) </code> Tim, thanks for the help and the quick response. I frequently see helpful responses made by you scattered around the web. I am fairly certain that I would be stuck in VBScript if you were not around to help the community. Cheers, jesse
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32