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 with dsCreateObj on Exchange 2K

Keywords: 	 Error 1047 with dsCreateObj on Exchange 5.5

Question:

I'm getting the 147 error on the line:
sMailBoxPath = dsCreateObj(RecipPath, "organizationalPerson", "cn=%sAlias%")
I am running the Add an exchange mailbox sample code for the adsi extender. Do i need to change "organizationalPerson" to reflect settings of my domain or ...?

I'm running Exchange 2k on win 2k. AD installed mixed mode.

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 E2K...

- You are trying to create a mailbox enabled user, not give a mailbox to a pre-existing mailenabled user right?

- In E2K you really don't have to "create" a mailbox, all you have to do is set certain attributes on the user account in AD and the RUS will do the creation for you.

RUS=Recipient Update Service

Q253838 explains what it is and does

- bottom line is you have to set mailNickname, displayname, and (either homeMTA, homeMDB, or msExchHomeServerName), and make sure TargetAddress is not set and pretty much everything else will be done for you (assuming you'll take what the RUS gives you, if not you're in for some more work:)

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

check out these Q articles for more info.. Q233209, Q275636, & Q253838

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 mailboxbox-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)

;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 testuser 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
Article ID:   W15384
File Created: 2003:05:13:11:27:24
Last Updated: 2003:05:13:11:27:24