Maintenance and Troubleshooting << >>

Using Directory Import

Import files are identical to export files except that import files contain a mode property that specifies an action to either update, create, modify, or delete the mailbox, distribution list, or custom recipient. If no mode is specified, the default mode is update, which creates the object if it does not exist or modifies the object if it does.

The following example shows how the mode property can be used in an import file.

Obj-Class,Mode,First Name,Last name,Display Name,Alias Name
mailbox,modify,Bill,Lee,Bill H. Lee,billl
mailbox,create,Bill Lee,Bill S. Lee,billsl
mailbox,delete,Test,Testing,Test of Import File,test2i

Importing the example file would change the display name of Bill Lee's mailbox to Bill H. Lee, create a mailbox for a new user named Bill S. Lee, and delete a test mailbox. You can create new import files using any text editor, word processor, or spreadsheet program that supports .csv files.

Using the Directory Import Command

  1. From the Tools menu in the Administrator window, choose Directory Import.
  2. Select the appropriate options.
  3. Choose Import to start the import process.

Option Description
Windows NT domain The location where user accounts will be created.
Microsoft Exchange server The server to which you want to import directory information.
Container The container where recipient objects will be created or modified.
Recipient Template A recipient object (mailbox, distribution list, custom recipient) to be used as a template object for all imported objects of the same type. It is chosen from the Address Book.
Import File The path and file name of the file that contains the information you are importing.
Create Windows NT account Specifies whether Windows NT accounts should be created for imported recipients.
Generate random password If this option is not selected, new Windows NT accounts are created with a password based on the account name. If the account name has fewer than four characters, the password is padded with "x" characters to a length of four characters. Passwords generated from account names longer than 14 characters are truncated.

If this option is selected, new Windows NT accounts are created with randomly generated passwords. The passwords are saved to the local disk in a .psw file in the same directory as the import file. If an NTFS partition is being used, the .psw file is accessible only to the user who is currently logged on.

Delete Windows NT account Specifies whether the Windows NT account associated with a recipient should be deleted when the recipient is deleted.
Logging level Specifies the event logging level when performing the import.
Separators Specifies the separators used in the imported file. Separators distinguish column, quote, and property types of information in the file.
Multivalued Properties Select Append if imported data in a multivalued property should be added to existing data. Select Overwrite if imported data in a multivalued property should replace any existing data.

Using Command-line Directory Import Options

Directory imports can also be done from the command line. Use the following syntax in the Admin.exe program:

admin /i <import file> /d <directory server name> /n /o <options file>

The /i switch is required. All other switches are optional. For more information about command-line options, see Administrator program Help.

Option Description
<import file> The name of the file that contains directory information to be imported.
<directory server name> The name of the server whose directory is to be updated.
/n Specifies that the progress bar is not displayed during directory import.
/o Specifies the name of an import options file.
<options file> The name of a file containing options that control how directory information is imported.

The import options file is used to specify the same types of options as the Administrator program's Directory Import dialog box. The import options file is a text file and must be in the following format.

DirectoryService=<DS server name>    
Basepoint=<DN of basepoint object>    
;(default=NULL, which indicates the local site)
Container=<RDN of container object>    
InformationLevel=[None, Minimal, Full]    
RecipientTemplate=<DN of default recipient object>    
NTDomain=<NT domain where accounts will be created>    
OverwriteProperties=[Yes, No]    
CreateNTAccounts=[Yes, No]    
DeleteNTAccounts=[Yes, No]    
ApplyNTSecurity=[Yes, No]    
GeneratePassword=[Yes, No]    
RawMode=[Yes, No]    

Note   The RawMode option is primarily intended for developers and should be enabled only by advanced users. Raw mode requires specific information about the directory schema. Files that can be imported normally are likely to fail in raw mode because they don't contain sufficient information. For more details about the directory schema, see the Microsoft Exchange Server Software Developer's Kit.