• Home
  • Installing Microsoft Exchange Server 2010 Pre-Requisites on Windows 2008 R2

Installing Microsoft Exchange Server 2010 Pre-Requisites on Windows 2008 R2

This is my all-time favorite script. It greatly reduces the amount of time required to install a fully functional Microsoft Exchange 2010 Server. This script will completely automate all the pre-requisites for installing Exchange 2010 and reboot as necessary.

Copy the following code to a notepad session and save the file as a PS1 and execute within PowerShell:

Code Segment

clear
write-host
write-host Exchange Server 2010 - Pre-requisites script
write-host Please, select which role you are going to install..
write-host
write-host '1) Hub Transport'
write-host '2) Client Access Server'
write-host '3) Mailbox'
write-host '4) Unified Messaging'
write-host '5) Edge'
write-host '6) Typical (CAS/HUB/Mailbox)'
write-host '7) Client Access and Hub Transport'
write-host
write-host '9) Configure NetTCP Port Sharing service'
write-host '10) Install 2007 Office System Converter: Microsoft Filter Pack - Only if you are installing Hub or Mailbox Server role'
write-host
write-host '13) Restart the computer'
write-host
write-host
write-host "Select an option.. [1-13]? "
$opt = read-host
 
Import-module ServerManager
 
switch ($opt)
{
1 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server }
2 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy }
3 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server}
4 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Desktop-Experience }
5 { Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS }
6 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy }
7 { Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy }
9 { Set-Service NetTcpPortSharing -StartupType Automatic }
10 { Write-warning 'Download it from here: http://tinyurl.com/36yrlj'}
13 { restart-computer }
default {write-host "You haven't selected any of the available options. "}
}

The Inner Workings of the Script

If you don’t trust PS1 scripts that you find on the internet, you can always copy the segments of code that you need and paste them within the PowerShell command directly. The most important section to remember is that you need to import the server manager module using the “Import-Module ServerManager” command. After that each of the other role and feature installations are relatively self-explanatory in each of the options in the switch case. They install the .NET Framework and Web server requirements and any other required software.

Leave a Reply

Help spread the word

1456 Greenwood Ct. | Bethlehem, PA 18015 | 484.707.1959 | me@thomaskay.me
©2018 All Rights Reserved. Content may not be used without prior express written consent.