With the recent release of SharePoint 2016, I decided it was time to perform an install in a Lab environment to check out all the new bells and whistles. So, I went over to codeplex and downloaded the latest version of everybody’s favorite SharePoint installation script, AutoSPInstaller*.
*At the time of this writing the version of AutoSPInstaller was v3.99.51.
Environment Information
The lab environment consists of four servers:
- (2) Front End Servers
- (1) Application Server
- (1) Search Server
- (1) Database Server
Each server is running Windows Server 2012 R2 Standard Edition and SharePoint 2016 was to be installed on the Front End, Application and Search servers.
Issue
When I finished filling out the AutoSPInstallerInput.xml file, I went ahead and kicked off the script only to be greeted a few seconds later with this screen:
Note: AutoSPInstaller was configured to run in Online mode. This means that AutoSPInstaller will download all the required prerequisites and hotfixes prior to executing the SharePoint PrerequisiteInstaller.exe.
In addition to the script stopping and displaying a partially helpful error message, the PrerequisiteInstaller log file opened up. About half way down the log file I noticed the following:
2016-06-07 11:15:06 - Unattended installation - automatically select the Next button 2016-06-07 11:15:06 - Beginning download/installation 2016-06-07 11:15:06 - Created thread for installer 2016-06-07 11:15:06 - Installing windows server roles and features. 2016-06-07 11:15:06 - Preparing to run the following commands: 2016-06-07 11:15:06 - Param( [String]$logFile ) Import-Module Servermanager Start-Transcript -path $logFile $operation = Add-WindowsFeature Application-Server,Web-Server,windows-identity-foundation,NET-Framework-45-ASPNET,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Web-Lgcy-Mgmt-Console,Web-Lgcy-Scripting,Web-Mgmt-Tools,Web-WMI,AS-Web-Support,Web-Common-HTTP,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45 -verbose if ($operation.ExitCode -eq 'SuccessRestartRequired') { Stop-Transcript $host.SetShouldExit(3010) exit } elseif (!$operation.Success){ Stop-Transcript $host.SetShouldExit(1000) exit } 2016-06-07 11:15:06 - Logs for these operations will be available at: 2016-06-07 11:15:06 - "C:\Users\[setupaccount]\AppData\Local\Temp\Pre3B3A.tmp.PS1.log" 2016-06-07 11:15:06 - Executing PowerShell command: 2016-06-07 11:15:06 - "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass "C:\Users\[setupaccount]\AppData\Local\Temp\Pre3B3A.tmp.PS1 -logFile C:\Users\[setupaccount]\AppData\Local\Temp\Pre3B3A.tmp.PS1.log" 2016-06-07 11:15:07 - Request for install time of Application Server Role, Web Server (IIS) Role 2016-06-07 11:15:08 - Request for install time of Application Server Role, Web Server (IIS) Role 2016-06-07 11:15:09 - Request for install time of Application Server Role, Web Server (IIS) Role 2016-06-07 11:15:10 - Request for install time of Application Server Role, Web Server (IIS) Role 2016-06-07 11:15:49 - Install process returned (0X3E8=1000) 2016-06-07 11:15:49 - [In HRESULT format] (0X800703E8=-2147023896) 2016-06-07 11:15:49 - Last return code (0X3E8=1000) 2016-06-07 11:15:49 - Reading the following DWORD value/name... 2016-06-07 11:15:49 - Flags 2016-06-07 11:15:49 - from the following registry location... 2016-06-07 11:15:49 - SOFTWARE\Microsoft\Updates\UpdateExeVolatile 2016-06-07 11:15:49 - Reading the following string value/name... 2016-06-07 11:15:49 - PendingFileRenameOperations 2016-06-07 11:15:49 - from the following registry location... 2016-06-07 11:15:49 - SYSTEM\CurrentControlSet\Control\Session Manager 2016-06-07 11:15:49 - Reading the following registry location... 2016-06-07 11:15:49 - SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired 2016-06-07 11:15:49 - Error: The tool was unable to install Application Server Role, Web Server (IIS) Role. 2016-06-07 11:15:49 - Last return code (0X3E8=1000) 2016-06-07 11:15:49 - Options for further diagnostics: 1. Look up the return code value 2. Download the prerequisite manually and verify size downloaded by the prerequisite installer. 3. Install the prerequisite manually from the given location without any command line options. 2016-06-07 11:15:49 - Cannot retry
Let’s make sense of the log snippet.
The prerequisiteinstaller.exe attempts to run a PowerShell cmdlet to install the required server roles and features:
Param( [String]$logFile ) Import-Module Servermanager Start-Transcript -path $logFile $operation = Add-WindowsFeature Application-Server,Web-Server,windows-identity-foundation,NET-Framework-45-ASPNET,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Web-Lgcy-Mgmt-Console,Web-Lgcy-Scripting,Web-Mgmt-Tools,Web-WMI,AS-Web-Support,Web-Common-HTTP,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45 -verbose if ($operation.ExitCode -eq 'SuccessRestartRequired') { Stop-Transcript $host.SetShouldExit(3010) exit } elseif (!$operation.Success){ Stop-Transcript $host.SetShouldExit(1000) exit }
A little ways below the command, we can see the error message and code that AutoSPInstaller displayed:
2016-06-07 11:15:49 - Error: The tool was unable to install Application Server Role, Web Server (IIS) Role. 2016-06-07 11:15:49 - Last return code (0X3E8=1000)
So we know that the issue has something to do with the prerequisite installer being unable to enable the Application Server and Web Server Roles. Right below the Last return code line, there are some troubleshooting suggestions:
2016-06-07 11:15:49 - Options for further diagnostics: 1. Look up the return code value 2. Download the prerequisite manually and verify size downloaded by the prerequisite installer. 3. Install the prerequisite manually from the given location without any command line options.
After researching the error code, I found that the Application Server and Web Server (IIS) Roles require the .NET Framework 3.5 Features enabled. Windows Server 2012 R2 only installs the assemblies that .NET Framework 4.5 Features requires by default, due to size. Fortunately, the Windows media contains a “Side by Side” folder of all the 3.5 assemblies. So the fix is simple, copy the “Side by Side” folder from the media onto a network drive or server drive and re-run the installer script.
Solution
The Steps listed below assume that AutoSPInstaller and the SharePoint media were placed at the following location: C:\SP
Follow these steps to fix the issue:
- Mount the Windows 2012 R2 media to a drive on each one of the SharePoint servers
- Open the media in windows explore and navigate to “Sources”
- Copy the “sxs” folder to the AutoSPInstaller SharePoint PrerequisiteInstaller folder
Windows Media AutoSPInstaller Location [drive]:\Sources\sxs
C:\SP\2016\SharePoint\PrerequisiteInstallerFiles\sxs
- Open PowerShell with elevated privileges (Run as administrator)
- Run the following commands:
- PS C:\>
$sxsSrc = "C:\SP\2016\SharePoint\PrerequisiteInstallerFiles\sxs"
- PS C:\>
Import-Module ServerManager
- PS C:\>
if (-not (Get-WindowsFeature -Name NET-Framework-Core).Installed) { Start-Process -FilePath DISM.exe -ArgumentList "/Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:`"$sxsSrc`"" -NoNewWindow -Wait }
- PS C:\>
After running the above commands, you can kick of AutoSPInstaller and all should work as expected.
Learn more about Tallan or see us in person at one of our many Events!
1 Comment.
Great!
Windows Server 2016 + SharePoint 2016 = ALL WORK
Thank You very mach!