WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Error 1047 Operations Error Occured

 Keywords:  create user mailbox add exchange ad 2000 5.5

Question:

I get this error on the line:
sMailBoxPath = dsCreateObj(RecipPath, "organizationalPerson", "cn=%sAlias%")
The wwwbatch.ini file indicates the following:
[ADSI Extender]
ErrorCode=8406
ErrorText=000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
Provider=LDAP Provider
I am running the 'Add an exchange mailbox' sample code for the ADSI extender. I am working with Exchange 2000 on Windows 2000 (ad installed mixed mode). Do I need to change "organizationalPerson" to reflect settings of my domain?

Answer:

Therein lies the problem, the sample code you're looking at is for exchange 5.5; there's some rather significant differences when you move to Exchange 2000.

Of course this can be kind of tricky and it may depend on how your organization is setup as well.

Check out these Microsoft knowledgebase articles for more info..
Q233209
Q275636
Q253838

Question 2:

What is RUS?

What I am trying to do is one of two things...

  • Create a user with mailbox in AD
  • Create a mailbox for users existing in AD that do not have one yet.
I realize now that these are two different tasks and need to know how the code would differ between E 5.5 and 2K.

Answer 2:

RUS=Recipient Update Service
Article Q253838 explains what it is and does

The Exchange 5.5 code might lead you astray, you don't have to do nearly as much in 2000.

I'd say your best bet is to read the q-articles and start from scratch as far as the mailbox goes.

Here's all you have to do to take a mail-enabled user and make them a mailbox-enabled user.

objectpath= full path of user

homeMDB=;to get this you'll have to dump 
;the homeMDB property of a known mailbox 
;enabled user

;dssetproperty(objectpath, "homemdb", homeMDB) ;don't use this - use code below 
objUser=ObjectOpen(ObjectPath)
objMailbox=ObjectOpen("CDOEXM.MailboxStoreDB")
objMailbox=objUser
ObjMailbox.CreateMailbox(homemdb)
objUser.SetInfo
objectClose(objMailbox)
objectClose(objUser)


;clear the target address property
;make sure you have the newest adsi extender
dssetproperty(objectpath, "targetaddress", "")

;if you want to use the default storage rules
dssetproperty(objectpath, "mdbUseDefaults", 1)

exit

I'd recommend doing a dump of all the properties of the test user before you run this and then do one a few minutes after you run this to see all of the things that get set automatically.

MORE:

Apparently there is a bug in the way the RUS sets security on the mailbox, or something to that effect... see http://support.microsoft.com/default.aspx?scid=kb;en-us;304935 for more information...but the bottom line is that microsoft will only support the creation of mailboxes in exchange 2000 if CDO is used...

You will also need to have the exchange system manager installed on the system you're running the script from in order to have access to the cdoexm objects...

Please note you will need to replace the dssetproperty(objectpath, "homeMDB", homemdb), in the above code with

objUser=ObjectOpen(ObjectPath)
objMailbox=ObjectOpen("CDOEXM.MailboxStoreDB")
objMailbox=objUser
ObjMailbox.CreateMailbox(homemdb)
objUser.SetInfo
objectClose(objMailbox)
objectClose(objUser)

Article ID:   W15383
File Created: 2003:05:13:11:27:24
Last Updated: 2003:05:13:11:27:24