problem with creating a mailbox for a user in active directory

problem with creating a mailbox for a user in active directory

Post by Sander Bosma » Tue, 01 Jan 2002 09:36:39


i'm coding in visual basic so i can create a user with a mailbox


objPerson.Firstname = Firstname
objPerson.Lastname = Lastname
objPerson.Fields("userPrincipalName") = username
'objPerson.Fields("userAccountControl") = 512
objPerson.Fields("userPassword") = password
objPerson.DataSource.SaveTo "LDAP://" + username +

Set objMailbox = objPerson.GetInterface("IMailboxStore")

objMailbox.CreateMailbox "LDAP://" + username +
",CN=users,CN=MyStorageGroup," & _
 "CN=InformationStore,CN=Servers,CN=First Administrative " _
 & "Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft " _
     & "Exchange,CN=Services,CN=Configuration,DC=gedrain,DC=dhs,DC=org"


everytime it gives me this error

this error  occurs everytime at the objMailbox.CreateMailbox  line
plz can somebody help me



1. problem with creating a mailbox for a user in active directory


I don't know anything about VB, but I looked this up, and I found something
that may help you:

"- Customer is using the makecm.vbs script from the CMSAMPLE site.

- Use the MAKECM.VBS script from the /microsoft site server/data/publishing

Otherwise, make sure you are logged on as a user that is a member of
"Schema Admins" group.

Hope this helps,

George Szakacs
Microsoft Messaging Support

Please do not reply directly by email unless asked specifically to do so.
This allows more than one person to answer questions as well as allows us
to review previous posts much more easily. I usually answer questions in
this newsgroup on Mondays, so if I have not provided a complete solution to
your question, please post your message again on Tuesday.

Common abbreviations that may be found in my posts:
E2K = Exchange 2000
ADC = Active Directory Connector
ESM = Exchange System Manager
AD U&C = Active Directory Users & Computers
OWA = Outlook Web Access

NOTE: Beta products are not supported in the directaccess newsgroups.
Public newsgroups have been provided for this purpose.

Legal Disclaimer:  This posting is provided "AS IS" with no warranties, and
confers no rights.
You assume all risk for your use.

Need a answer quick? Most answers can be found in TechNet. Give it a try
today at:

Exchange white papers and other useful documents can be found at:

2. Moving users between sites

3. changing plain text to html

4. OWA Doesn't Print Calendar

5. Move Mail box from one container to another on the same exchange server.....

6. new mailbox not being created with new active directory user

7. Creating a new user in active directory

8. program to create report from active directory user info

9. mail enable a user when created in Active Directory

10. How to use CDOEXM to create Mail-Enabled users in Active Directory in C# (II)