Silent Exchange 2013 install with all prerequisites on Windows Server 2012 R2

Posted: August 13, 2015 in Exchange

Simple PowerShell script which performs unattended install of Windows Server 2012 roles,component needed for Exchange,prepares AD and Schema and finally,installs Exchange


Exchange setup (trial):

Filter Pack for Microsoft Office 2010:
Service Pack 1 for Microsoft Office Filter Pack 2010:

Unified Communications Managed API (UCMA) 4.0:

All above files I put in c:\preinstall folder but you can change path in script:

function firstFunction {
Write-Host "You chose option 1"

Write-Host "----------------------------"
Write-Host "                            "
Write-Host "Silent Exchange 2013 install"
Write-Host "                            "
Write-Host "----------------------------"

do {
[int]$userMenuChoice = 0
while ( $userMenuChoice -lt 1 -or $userMenuChoice -gt 4) {
Write-Host "1. Install Exchange Prerequisites"
Write-Host "2. Prepare Schema,AD and install Exchange 2012"
Write-Host "3. Quit and Exit"

[int]$userMenuChoice = Read-Host "Please choose an option"

switch ($userMenuChoice) {
New-Item -ItemType Directory -Force -Path C:\Temp  #Create Temp folder if it doesn't exists
cd "c:\preinstall"
.\UcmaRuntimeSetup.exe /passive /norestart
.\FilterPack64bit.exe /passive /norestart
.\filterpack2010sp1-kb2460041-x64-fullfile-en-us.exe /passive /norestart
.\Exchange-x64.exe /extract:C:\Temp\Exchange2013-x64 /u
Install-WindowsFeature RSAT-ADDS, AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation -Restart

cd "C:\Temp\Exchange2013-x64"

.\Setup.exe /IAcceptExchangeServerLicenseTerms /ps
.\Setup.Exe /IAcceptExchangeServerLicenseTerms /preparead /organizationname:bigfirm
.\Setup.Exe /IAcceptExchangeServerLicenseTerms /mode:install /r:mb, ca /MdbName:bigfirm_db01 on:bigfirm
#If you wish to restart computer,uncomment next line
#Restart-computer -force

default {Write-Host "Nothing selected"}
} while ( $userMenuChoice -ne 3 )



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s