How to Install Exchange 2007 from a Command Prompt

If UAC is enabled, you MUST right click on command prompt and click Run As Adminstrator before running these commands:
ServerManagerCmd -i RSAT-ADDS

(you will have to reboot the system before running the following commands)

ServerManagerCmd -i PowerShell
ServerManagerCmd -i Web-Server
ServerManagerCmd -i Web-ISAPI-Ext
ServerManagerCmd -i Web-Metabase
ServerManagerCmd -i Web-Lgcy-Mgmt-Console
ServerManagerCmd -i Web-Basic-Auth
ServerManagerCmd -i Web-Digest-Auth
ServerManagerCmd -i Web-Windows-Auth
ServerManagerCmd -i Web-Dyn-Compression
ServerManagerCmd -i RPC-over-HTTP-proxy

(now run setup from the DVD) /pl /prepareschema /PrepareAD /PrepareAllDomains

(now install the CAS,HUB, and MBX roles)
Setup /m:install /r:c,h,m