Exchange.55.Mailbox.Create
Top  Previous  Next


Creates Exchange 5.5 mailbox

Before creating the mailbox, use Account.Create to create the NT Account for the Mailbox

Category
Exchange 5.5

Script section
[Batch], inside Data.Loop..EndLoop statement

Requirements

·Exchange 5.5 server with Exchange SP4 or later  
·acctcrt.dll  
·ADSI2.5  

Exchange.55.Mailbox.Create Server[:port], ContainerPath, NTAccountDomain, SamAccountNameColumnVariable, DisplayNameColumnVariable, SMTPsuffix

Server
Exchange server name  

Port
LDAP port [Optional parameter]  
Default is 389, but when Exchange 5.5 is installed on Windows 2000 this port must be changed since Windows 2000 LDAP also uses this port. (Check port number in Exchange / Site / Configuration / Protocols / LDAP.)  

ContainerPath
Path to container where mailbox is to be created  

NTAccountDomain
Name of NT domain where the primary NT account that should be associated with this Mailbox exists  

SamAccountNameColumnVariable
Format: "%colX%", X = Column in [Data] section with existing SamAccountNames / Exchange aliases  
 
DisplayNameColumnVariable
Format: "%colY%", Y = Column in [Data] section with account descriptions / Exchange display names  

SMTPsuffix
SMTP e-mail suffix, example: "@mycompany.com"  

Common problems
The error message "OLE error 8007202F" means "There was a constrain violation" - most common causes: an empty string in a parameter or too long string.

Examples
1) NT4 - create mailboxes for accounts listed in column 2 with full names listed in column 3

·Server name = "ExchSrv01"  
·Windows domain="domain30"  
·Exchange Organization = "Acme"  
·Exchange Site = "Site01"  
·Exchange container ="Recipients/NormalUsers"  

Exchange.55.Mailbox.Create ExchSrv01, o=Acme/ou=Site01/cn=Recipients/cn=NormalUsers, domain30, %col2%, %col3%, @acme.com

2) Windows 2000 - create mailboxes for accounts listed in column 2 with full names listed in column 3

·Server name = "ExchSrv01"  
·Exchange LDAP port 390  
·Windows domain="domain30"  
·Exchange Organization = "Acme"  
·Exchange Site = "Site01"  
·Exchange container = "Recipients"  

Exchange.55.Mailbox.Create ExchSrv01:390, o=Acme/ou=Site01/cn=Recipients, domain30, %col2%, %col3%, @acme.com