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

Untitled

Exchange setup (trial):https://www.microsoft.com/en-us/evalcenter/evaluate-exchange-server-2013

Filter Pack for Microsoft Office 2010:http://www.microsoft.com/en-us/download/details.aspx?id=17062
Service Pack 1 for Microsoft Office Filter Pack 2010:http://www.microsoft.com/en-us/download/details.aspx?id=26604

Unified Communications Managed API (UCMA) 4.0:http://www.microsoft.com/en-US/download/details.aspx?id=34992

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

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

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) {
1{
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


}
2{
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 )

Untitled

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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