How do I remove the value in a AD field
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
How do I remove the value in a AD field

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Guest






Posted: Tue Nov 01, 2005 5:58 pm    Post subject: How do I remove the value in a AD field Reply with 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
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 Reply with quote

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 Reply with quote

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
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB