PowerShell Desired State Configuration – Install Exchange Server 2013 Prerequisites

A simple DesiredStateConfiguration file that is used to install Exchange 2013 Prerequisites for both the mailbox and Client Access Server (CAS) roles on Windows Server 2013 R2. Use at your own peril!

Configuration Exchange2013PrerequisitesForServer2013MailboxRoleCASRole
{ 
       Node "localhost"
       { 
           WindowsFeature HTTPActivation 
           { 
                  Ensure    = “Present” 
                  Name      = “AS-HTTP-Activation” 
           } 

            WindowsFeature DesktopExperience 
           { 
                  Ensure    = “Present” 
                  Name      = “Desktop-Experience” 
           }

            WindowsFeature NETFramework45Features
           { 
                  Ensure    = “Present” 
                  Name      = “NET-Framework-45-Features” 
           } 

           WindowsFeature RPCoverHTTPProxy
           { 
                  Ensure    = “Present” 
                  Name      = “RPC-over-HTTP-Proxy"
           }
           WindowsFeature RSATClustering
           { 
                  Ensure    = “Present” 
                  Name      = “RSAT-Clustering"
           }
           WindowsFeature RSATClusteringCmdInterface
           { 
                  Ensure    = “Present” 
                  Name      = “RSAT-Clustering-CmdInterface"
           }
           WindowsFeature WebMgmtConsole
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Mgmt-Console"
           }
           WindowsFeature WASProcessModel
           { 
                  Ensure    = “Present” 
                  Name      = “WAS-Process-Model"
           }
           WindowsFeature WebAspNet45
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Asp-Net45"
           }
           WindowsFeature WebBasicAuth
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Basic-Auth"
           }
           WindowsFeature WebClientAuth
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Client-Auth"
           }
           WindowsFeature WebDigestAuth
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Digest-Auth"
           }
           WindowsFeature WebDirBrowsing
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Dir-Browsing"
           }
           WindowsFeature WebDynCompression
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Dyn-Compression"
           }
           WindowsFeature WebHttpErrors
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Http-Errors"
           }
           WindowsFeature WebHttpLogging
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Http-Logging"
           }
           WindowsFeature WebHttpRedirect
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Http-Redirect"
           }
           WindowsFeature WebHttpTracing
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Http-Tracing"
           }
           WindowsFeature WebISAPIExt
           { 
                  Ensure    = “Present” 
                  Name      = “Web-ISAPI-Ext"
           }
           WindowsFeature WebISAPIFilter
           { 
                  Ensure    = “Present” 
                  Name      = “Web-ISAPI-Filter"
           }
           WindowsFeature WebLgcyMgmtConsole
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Lgcy-Mgmt-Console"
           }
           WindowsFeature WebMetabase
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Metabase"
           }
           WindowsFeature WebMgmtService
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Mgmt-Service"
           }
           WindowsFeature WebNetExt45
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Net-Ext45"
           }
           WindowsFeature WebRequestMonitor
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Request-Monitor"
           }
           WindowsFeature WebServer
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Server"
           }
           WindowsFeature WebStatCompression
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Stat-Compression"
           }
           WindowsFeature WebStaticContent
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Static-Content"
           }
           WindowsFeature WebWindowsAuth
           { 
                  Ensure    = “Present” 
                  Name      = “Web-Windows-Auth"
           }
           WindowsFeature WebWMI
           { 
                  Ensure    = “Present” 
                  Name      = “Web-WMI"
           }
           WindowsFeature WindowsIdentityFoundation
           { 
                  Ensure    = “Present” 
                  Name      = “Windows-Identity-Foundation"
           }

    } 
}

Load up the Configuration script into memory by entering:

Exchange2013PrerequesitiesForServer2013MailboxRoleCASRole

It generates a folder in your working directory and generates a .MOF file.

Run it on the Server 2012 server to install the Windows Features:

Start-DscConfiguration -Wait -Verbose -Path .\Exchange2013PrerequisitesForServer2013MailboxRoleCASRole

 

Reference full installation of Server 2013:
http://exchangeserverpro.com/install-exchange-2013-pre-requisites-windows-server-2012/
Reference for Desired State Configuration:
http://technet.microsoft.com/library/dn249918.aspx

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