| Author |
Message |
Guest
|
Posted:
Tue Nov 01, 2005 5:58 pm Post subject:
How do I remove the value in a AD field |
|
|
How do I remove the value in a AD field (Extensionattribute1)
I've tried :-
oUser.Put "extensionattribute6", ""
and,
txt = ""
oUser.Put "extensionattribute6", txt
|
|
| Back to top |
|
 |
Glen Scales [MVP]
Guest
|
Posted:
Wed Nov 02, 2005 9:58 am Post subject:
Re: How do I remove the value in a AD field |
|
|
ADSI put doesn't like blank strings or nulls you should use putex to set it
to null eg
oUser.putEx 1,"extensionAttribute1", vbNull
Make sure you call setinfo to commit it.
Cheers
Glen
<chortler@fetchmail.co.uk> wrote in message
news:1130858838.763852.181340@g49g2000cwa.googlegroups.com...
| Quote: | How do I remove the value in a AD field (Extensionattribute1)
I've tried :-
oUser.Put "extensionattribute6", ""
and,
txt = ""
oUser.Put "extensionattribute6", txt
|
|
|
| Back to top |
|
 |
Brandon
Guest
|
Posted:
Fri Nov 25, 2005 1:58 am Post subject:
Re: How do I remove the value in a AD field |
|
|
chortler@fetchmail.co.uk wrote:
| Quote: | How do I remove the value in a AD field (Extensionattribute1)
I've tried :-
oUser.Put "extensionattribute6", ""
and,
txt = ""
oUser.Put "extensionattribute6", txt
After you set the value you have to actually save it, believe it or not. |
In VB you would do oUser.setInfo and that will actually retain the
data. What you can do is the following to easily verify what I said:
wscript.echo oUser.extensionattribute6 & " before change"
oUser.Put "extensionattribute6", ""
wscript.echo oUser.extensionattribute6 & " after change"
and that will let you see if the value actually gets blanked out.
|
|
| Back to top |
|
 |
|
|
|
|