exchange attribs

flanderp

Member
Joined
Aug 30, 2006
Messages
9
Programming Experience
Beginner
Hi,

Does anyone know of any examples for removing exchange attribs from a user in AD.

If I select exchange tasks on a user I am given the option to remove exchange attribs from the selected recipient.

I need to do this in code I have googled but can not find any examples.

Thanks
Paul
 
Bit more information as to why I need to do this ....

If I create a user in AD and the try to create the mail box with vb.net or vbscript

ex
Dim oIADSUser
Set oIADSUser = GetObject("ldap://CN=fred tft,OU=Students,DC=hub,DC=TCAT,DC=NETWORK")
oIADSUser.CreateMailbox "ldap://CN=Staff 1,CN=SG1,CN=InformationStore,CN=TEL-EXCH01,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=TCAT,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=tcat,DC=network"
oIADSUser.SetInfo

I get an error message saying that the user already has an email address.

If I run exchange tasks and select remove exchange attribs then re run the vbscript , the exchange account is created.

If I then delete the exchange account using

oIADSuser.deletemailbox

The exchange account is removed , but if I then try to re create it with the createmailbox command it fails with

user already has an email address.

But checking AD users and computers and the exchange tabs have gone?

It seems the only way to clear it is by running the exchange tasks and selecting the remove exchange attribs.


thanks
Paul
 
Back
Top