Scripting a New Mailbox
After you've selected the attributes to use in the new mailboxes, you write a short batch file to incorporate command-line parameters and create a new mailbox. For example, I created newmb.bat, which Listing 1 shows. I started each section of the script with a REM comment. The first section of the script echoes the contents of the header information to a file with the user's name. When you write your script, the header must contain the attributes you selected. The second section contains the information for each attribute in the header.
To demonstrate how this batch file works, let's create a mailbox for new user Jennifer Hansen. Jennifer already has a domain account, jenniferh, in DomainA. Jennifer's domain account will be the primary account for the mailbox.
The variable %1 represents the username in the domain account, %2 represents the user's first name, and %3 represents the user's last name. The script uses the variables to customize the import file. You provide the values for these variables when you launch the script from the command-shell window. In this example, you would type
newmb.bat jenniferh Jennifer Hansen
on the command line to launch the script and provide the three variable values. (For more information about using environmental variables to temporarily hold a value, see Dick Lewis, "Shell Scripting 101, Lesson 3," http://www.winscriptingsolutions.com, InstantDoc ID 20142.) . . .
Can anyone help
Adam January 06, 2004