A lot of things have to be installed on a Windows 2008 Server before Exchange 2007 can be installed. There are number of ways for installing the components, but the easiest is to use the exchange management shell. Copy and paste the following command in a command prompt window for the installation of necessary roles.
1. CAS role alone or a typical installation (cas, hub and mailbox)
ServerManagerCmd -i Powershell Web-Server Web-ISAPI-Ext Web-Metabase Web-Lgcy-Mgmt-Console Web-Basic-Auth Web-Digest-Auth Web-Windows-Auth Web-Dyn-compression RPC-over-HTTP-proxy RSAT-ADDS
2. Mailbox Role Alone
ServerManagerCmd -i Powershell Web-Server Web-ISAPI-Ext Web-Metabase Web-Lgcy-Mgmt-Console Web-Basic-Auth Web-Windows-Auth RSAT-ADDS
3. Clustered Mailbox Role
ServerManagerCmd -i Powershell Web-Server Web-ISAPI-Ext Web-Metabase Web-Lgcy-Mgmt-Console Web-Basic-Auth Web-Windows-Auth Failover-Clustering RSAT-ADDS
4. Hub Role Alone
ServerManagerCmd -i Powershell
5. UM Role Alone
ServerManagerCmd -i Powershell Desktop-Experience