Eventually, many Exchange administrators get tired of using
graphical tools to get everything done. Although Microsoft’s GUI-based tools
are pretty good, the need to start a graphical tool and browse to the right administrative
location can get tedious; especially when you just need to do something like
enable a user’s mailbox. Fortunately, there are other Exchange admins that feel the same way. One in particular, Joe
Richards, has taken matters into his own hands and written a command line tool
called ExchMbx to handle everyday Exchange
tasks from the command line.

ExchMbx allows you to perform a
number of operations, including enabling and disabling users and mailboxes,
manage quotas, moving mailboxes and a whole lot more.

Here’s a list of switches from the ExchMbx
tool:

  • -h host–Host to use, use default
    LDAP server
  • -bbasedn–DN to do the work on. If basedn is not specified the program will read from stdin anything piped to it or if you want you can type
    the DNs there followed by a ctrl-z to terminate
    the pipe.
  • -elapsed–Display elapsed time in
    seconds
  • -cr MDB–Create
    Mailbox in MDB  – See Format Below
    for that value
  • -move MDB–Move Mailbox to MDB  – See Format Below for that value
  • -me x–MailEnable
    object. If necessary x is targetaddress.
  • -clear–Clear
    all email attribs.
  • -upd–Update,
    use on existing objects for quota and AL mods
  • -safety x–How many objects before
    safety kicks in. Default 10
  • -delim x–X
    specifies delimiter for MDB format. Default :
  • -fdelim x–X
    specified delimiter for file format. Default [TAB]
  • -unsafe–Don’t
    have a safety, modify objects no matter how many.
  • -upto x–Process
    DNs until x successes have occurred.
  • -cont–Continue
    with objects even if errors.
  • -hfal–Hide
    from address lists.
  • -uhfal–Unhide
    from address lists.
  • -keepmail–When
    used with -me uses existing mail attribute for targetAddress.
  • -quota x:y:z Set Quota, x=Warn MB, y=Stop Send MB,
    z=Stop Receive MB. Use :: to set quota to system
    default.
  • -internetencoding–This
    is the encoding type for mailenabled objects.

In order to use ExchMbx, you need
to install the Exchange administrative tools on the machine
you’re using. When you use the program, you’re warned that you’re doing so at
your own risk, so know what you’re doing and test it on a lab machine first.

Further, with the release of Exchange 2003 SP2, some
interfaces to Exchange changed and certain functionality in ExchMbx
is broken as of this writing, but the author has indicated that he plans to
release an update that fixes these problems.