Previous Page TOC Next Page



— B —
Command Reference


The majority of your time will be spent using the Exchange client, Exchange Administrator, or LoadSim—all graphical user interface programs. So you will interact with these products mostly by way of menus and the mouse. However, there are some command-line options and utility programs you should be familiar with. This appendix covers the more common ones.

Most commands listed here are .EXEs. This appendix lists the name, a brief description of the purpose, whether it is a utility, and the command-line options.



This appendix is for reference only, and it assumes you know how to apply the utilities covered. Some utilities and parameters for programs listed herein can cause real problems with your Exchange Server if improperly used. Be sure you know what you're doing.


ADMIN


The Exchange Administrator program is the main interface for managing an Exchange server. It is optionally installed during the server Setup process. You can install Administrator on any machine, not just the Exchange server itself.

ADMIN.EXE is a program that exists in the \EXCHSRVR\BIN directory. If you execute it, the Exchange Administrator program will start. The following sections summarize the command-line switches available for the Administrator program.

/r


The /r parameter starts the Administrator program in raw mode. Raw mode provides access to all directory attributes contained in the schema.



Because the directory is exposed, you should be careful with modifications when using this option. You can really mess up your Exchange server if you don't know what you are doing.

The schema defines the structure for information in the directory. The schema defines the rules for structuring information such as which attributes are associated with which objects, and which types of values can be associated with which attributes. The schema also defines the relationship between objects. The directory enforces these rules.

You can also run the Administrator program in raw mode by creating a RawMode entry in the Windows NT registry. Creating the registry entry makes the Administrator program run in raw mode at all times. To create the registry entry, run the Registry Editor and find the following key:


HKEY_CURRENT_USER\Software\Microsoft\Exchange\MSExchangeAdmin\Desktop

Under this key, add a new value as follows:

Value Name:

RawMode

Data Type:

REG_DWORD

Data:

0 (don't run in raw mode unless forced by /r command line switch)


1 (always run in raw mode)

Radix:

Hex



/h or /?


The /h or /? parameter starts the Administrator program and displays the Microsoft Exchange Administrator help.

/s <ServerName>


The /s <ServerName> option starts the Administrator program and connects to the server you specify for ServerName.

/m [Site\]MonitorName|Server


The /m [Site\]MonitorName|Server option starts the Administrator program and starts the monitor you specify for MonitorName. The server Site is optional. MonitorName is the directory name of the monitor within the site, and Server is the server to which the monitor should connect.

/t


The /t option temporarily suspends monitoring on a server that you are taking down for maintenance or backup. This option is used in conjunction with various monitor suspension options, which are explained in the following:



When you are performing maintenance on a server, you must set the admin /t command to start before the server goes offline. Consider the polling intervals of the monitors and be certain that each monitor receives a maintenance mode notification before the server goes down.


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


This option runs the command-line directory import utility. The /i switch is required, and all other switches are optional.

<import file> is the name of the file that contains the directory information to be imported.

<directory server name> is the name of the server whose directory is to be updated.

/n sets the "no progress" switch. This indicates that you do not want to see the progress bar that is displayed by default during directory import.

<options file> is the name of a file containing options that control how directory information is imported.

/e <export file> /d <directory server name> /n /o <options file>


This option runs the command-line directory export utility. The /e switch is required, and all other switches are optional.

<export file> is the name of the file where you want exported directory information to be written.

<directory server name> is the name of the server from which the directory will be exported.

/n sets the "no progress" switch. This indicates you do not want to see the progress bar that is displayed by default during directory export.

<options file> is the name of a file containing options that control how directory information is imported.

EDBUTIL


EDBUTIL is one of the Exchange Server database utilities. Run it with no command-line options to list a description of the options on the screen.

EDBUTIL.EXE is in the \EXCHSRVR\BIN directory. It can perform five housekeeping functions on a server's databases. Each housekeeping function is described in the following sections. You can also read more about EDBUTIL in Chapter 22, "Diagnosing the Cause of a Problem."


Defragmentation/Compaction


The defragmentation/compaction function performs offline compaction of a database.

The following is the syntax for defragmentation:


EDBUTIL /d <database name> [options]

The options are zero or more of the following switches, separated by a space:



Note that before defragmentation begins, soft recovery is always performed automatically to ensure that the database is in a consistent state.


Recovery


The recovery function performs an Information Store recovery, bringing all databases to a consistent state.

The following is the syntax for the recovery function:


EDBUTIL /r [options]

The options are zero or more of the following switches, separated by a space:


Consistency


The consistency function verifies the consistency of an Exchange database.

The following is the syntax:


EDBUTIL /c <database name> [options]

The parameters are either <database name> (the filename of the database to verify) or /ispriv, /ispub, or /ds. The special switches /ispriv, /ispub, and /ds use the registry to automatically set the database name for the appropriate Exchange store.

The options are zero or more of the following switches, separated by a space:



The consistency checker performs no recovery and always assumes that the database is in a consistent state. It returns an error if this is not the case.


Upgrade


The upgrade function upgrades a database (created using a previous release of Microsoft Exchange Server) to the current version.

The following is the syntax:


EDBUTIL /u <database name> /d<previous .DLL> [options]

The following are the parameters:

The options are zero or more of the following switches, separated by a space:



There are a couple things to note.

First, you should use this utility only to upgrade a database after an internal database format change has taken place. If necessary, this will usually only coincide with the release of a major, new revision of Microsoft Exchange Server.

Second, before you upgrade, the database should be in a consistent state. An error will be returned if otherwise.



File Dump


The File Dump function generates formatted output of various database file types.

The following is the syntax:


EDBUTIL /m[mode-modifier] <filename>

The following are the parameters:


ISINTEG


ISINTEG is one of the Exchange Server database utilities. Run it with no command-line options to list a description of the options on the screen.

ISINTEG.EXE is in the \EXCHSRVR\BIN directory.

There are three main ISINTEG functions: fix, patch/repair, and dump. Each is described in the following sections. For more information on ISINTEG, see Chapter 22.

Fix


The fix function provides a way to check, and optionally fix, the Exchange Information Store. The command syntax is as follows.


isinteg -pri|-pub [-fix] [-verbose] [-l logfilename] [-test testname,...]

The following summarizes the parameters for the fix function:


Patch/Repair


The Patch/Repair function will repair the Exchange Information Store after an offline restore.

If you have restored a database—either PRIV.EDB or PUB.EDB—from a backup, you must run the patch/repair utility before the MSExchangeIS service will start.



To run this utility, the MSExchangeDS and MSExchangeSA services must be running and the MSExchangeIS service must be stopped.

Following is the typical syntax for patch/repair:


isinteg -patch

Dump


The Dump function generates a verbose dump of the Exchange Information Store data. Following is the command syntax:


isinteg -pri|-pub -dump [-l logfilename]

The following summarizes the parameters for the dump function:


LoadSim


LoadSim is the Microsoft Exchange Client load simulation tool provided with Exchange Server. See Appendix A, "Understanding and Using LoadSim," for more details on using LoadSim.

For convenience, LoadSim has some optional command-line options that can help automate running LoadSim scripts.

The following is the syntax, and each part is described in the following sections:


LOADSIM [simfile[test]] [-q]

LSLOG


LSLOG is a utility included with LoadSim that is used for parsing and reporting on the LoadSim log files. This utility is quite useful for generating statistics and data based on the performance of the LoadSim client.

The following is the syntax:


LSLOG <op> <args>

The parameters <op> and <args> are the operation to perform and its arguments, respectively.

Valid operations for <op> are as follows. Each operation is explained in a subsequent section.


truncate


The truncate parameter removes times before the begin time and after the end time. It also truncates the file at end-of-year boundaries.

The following is the syntax for truncate:


LSLOG truncate logfile [begin end]

merge


The merge parameter merges two or more log files so that the resulting single log file's events are still in sequential order.

The following is the syntax:


LSLOG merge [/r] logfile logfile [logfile ...]

If the /r (rebase) flag is specified, all files begin at Jan 01 00:00:00, and are merged accordingly.

merge supports wildcard file specifications.

answer


The answer parameter computes and outputs the Nth percentile single and weighted average response times for the given LoadSim logfile. If not specified, the default pctile is 95, or the 95th percentile.

The following is the syntax:


LSLOG answer [/i] logfile [pctile] [flags...]

If the /i (ignore) flag is specified, weight values for specific actions of a given type are ignored; all actions of the same type are weighted equally.

The -w flag can be specified at the end of the command. It means to override the default weight for a given action. The syntax looks like


-wACTION:N

where ACTION is the name of the action—for example, READ—and N is the new weight. Action names are matched case-insensitive, without spaces, and only up to the number of characters you specify; for example replya matches REPLY ALL.

You can specify as many flags as you want. For example, you can override the weight values of several different actions (see the example in the "Examples" section).

times


The times parameter outputs the first and last times the given log file was logged into.

The following is the syntax:


LSLOG times logfile

The times parameter supports wildcard file specifications. The logfile is the LoadSim log file to read.

Examples


Following are some examples of LSLOG usage.


LSLOG truncate loadsim.log > loadsim.1t4


LSLOG trunc loadsim.log 4 8 > loadsim.4t8
LSLOG merge /r client?.log > mclients.log
LSLOG answer loadsim.log
LSLOG answer -i loadsim.log
LSLOG answer loadsim.log -wread:5 -wsend:5 -wreplya:0
LSLOG times *.log

MTACHECK


MTACHECK is one of the Exchange Server database utilities. The MTA database integrity checker performs checks on the MTA objects and does a general cleanup by collecting orphaned objects and discarding them. For more on MTACHECK, see Chapter 22.

MTACHECK.EXE is located in the \EXCHSRVR\BIN directory. Run MTACHECK with no command-line options to execute the MTA check. Run it with the /? parameter to list options on screen.

The following is the syntax:


MTACHECK [/V] [/F <filename>]


To run this utility, the MSExchangeMTA service must be stopped.


/V


The /V option provides verbose output during the execution of the MTA Checker.

/F <filename>


The /F option redirects the output of MTACHECK into the file specified by filename.

NEWPROF


The Exchange clients include a utility called NEWPROF.EXE that can be used to automatically generate profiles. This utility generates a profile from the DEFAULT.PRF file.

An administrator can create a customized DEFAULT.PRF using the Setup Editor that contains the home server for the users as well as any other desired configuration information. After users install the client, they can use NEWPROF.EXE with the installed DEFAULT.PRF, as customized by the administrator, to generate their profile. This should be easier for the user because the user doesn't have to answer any questions when the client first starts.

When the client is installed, both NEWPROFS.EXE and DEFAULT.PRF are installed in the directory in which the client is installed, for example \EXCHANGE.

NEWPROF.EXE must be started from a command prompt and uses the following syntax:


NEWPROF -s <path\><filename>.PRF

Client Command-Line Switches


There are several command-line switches available for both the Windows-based and MS-DOS Exchange clients. These optional parameters can make using the client more convenient.

The Windows-based Exchange clients support the following switches:

Switch

Purpose

<filename>

Creates a new note, attaching the specified file.

/n

Creates a new note.

/f<filename>

Opens the message in the specified .MSG file

/s

Opens a new find dialog box.

/a

Opens the address book.

/i

Opens the Inbox.

/e

Embeds an OLE command line.


The MS-DOS Exchange client supports the following command-line switches:

Switch

Purpose

-p[profile]

Used to specify the user profile to open on startup.

-s

Displays the profile settings.

-m

Starts in monitor mode.

-[25|43|50]

Sets the display mode for the number of limes to display in the client.



NET Commands


There are several NET commands that can be entered from the NT command prompt to start and stop Exchange Server services. The next four sections highlight the NET command for the four core services of Exchange Server. If your server has more services, you can start and stop them also with a console NET command.

MSExchangeIS


MSExchangeIS is the Windows NT service name for the Microsoft Exchange Information Store (IS).


MSExchangeMTA


MSExchangeMTA is the Windows NT service name for the Microsoft Exchange Message Transfer Agent (MTA).


MSExchangeDS


MSExchangeDS is the Windows NT service name for the Microsoft Exchange Directory Service (DS).


MSExchangeSA


MSExchangeSA is the Windows NT service name for the Microsoft Exchange System Attendant (SA).


Summary


This appendix was intended to give you a quick and handy command reference for some of the more common utilities used with Exchange Server. It is by no means exhaustive, but it should help provide clarification to help you survive out there using Exchange Server.

Previous Page Page Top TOC Next Page