Now that the SQL Server and AD are configured for the farm, let’s go about preparing servers for SharePoint 2019. There are just a few steps we want to do to ensure the servers are set up for our usage. With SharePoint 2016 there was the concept of minrole servers. These being servers that have a specific use. Whether it be search, web front end, distributed cache, etc, you can minimize the responsibilities of each server to make the farm more efficient. Because this particular configuration is for a high-end desktop\laptop I will be able to deploy a type of minrole server (we’ll cover that in the next post). I will build out a full minrole farm in a future post using Microsoft Azure. In this series, we will deploy an App and a Web server. This post will assume you have created Windows Server 2016 VMs already.
If you are interested in checking out the other items in this series click on the links below:
- Overview
- Install and Configure SQL Server 2017 for SharePoint 2019
- Preparing Servers for SharePoint 2019 (This one)
- Install SharePoint 2019 with AutoSPInstaller
Preparing the SharePoint 2019 App Server
In the following script I am doing a couple of different things to set things up for both installing SharePoint, but also building and testing solutions later. Because SP2019 separates the APP and WFE responsibilities much better than older versions of SharePoint there are a few things we will be doing shortly for the WFE server than we will for this APP server. I will call them out in the next section. I outline the actions the script is doing in the script itself (watch the comment lines)
#make it easier to develop and test scripts in the future by removing the default execution policies Set-ExecutionPolicy unrestricted #Rename server $serverName = "srv-SP2019APP" Rename-Computer -NewName $serverName -force #Configure the Network Adapter $netadapter = Get-NetAdapter -Name Ethernet $netadapter | Set-NetIPInterface -Dhcp Disabled $netadapter | New-NetIPAddress -IPAddress 192.168.0.120 -PrefixLength 24 #Point DNS at the DC Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses "192.168.0.1" #Rename the network adapter (this one is on the private network of the VM host and is meant for internal communications) Rename-NetAdapter -Name "Ethernet" -NewName "Internal Network"; #disable the firewall so I don't have to deal with communication issues right now (will enable later). netsh advfirewall set allprofiles state off #Enable Remote Desktop (Get-WmiObject -Class "Win32_TerminalServiceSetting" -Namespace root\cimv2\terminalservices).SetAllowTsConnections(1) (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(0) Restart-Computer
Now that things are set up you can join to the domain and set up your admin accounts as you wish.
Preparing the SharePoint 2019 Web Server
As I said in the previous section because SP2019 fully separates the features of an App and WFE server we will add a few more items to our configuration of the WFE server. Specifically, we will be disabling the IE Security on the WFE server:
#make it easier to develop and test scripts in the future by removing the default execution policies Set-ExecutionPolicy unrestricted #Rename server $serverName = "srv-SP2019WFE" Rename-Computer -NewName $serverName -force #Configure the Network Adapter $netadapter = Get-NetAdapter -Name Ethernet $netadapter | Set-NetIPInterface -Dhcp Disabled $netadapter | New-NetIPAddress -IPAddress 192.168.0.125 -PrefixLength 24 #Point DNS at the DC Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses "192.168.0.1" #Rename the network adapter (this one is on the private network of the VM host and is meant for internal communications) Rename-NetAdapter -Name "Ethernet" -NewName "Internal Network"; #disable the firewall so I don't have to deal with communication issues right now (will enable later). netsh advfirewall set allprofiles state off #Enable Remote Desktop (Get-WmiObject -Class "Win32_TerminalServiceSetting" -Namespace root\cimv2\terminalservices).SetAllowTsConnections(1) (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(0) #Disable IE Enhanced Security Write-Host -ForegroundColor White " - Disabling IE Enhanced Security..." $AdminRegLocation = "SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" $UserRegLocation = "SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" $BaseRegLocation = [Microsoft.Win32.RegistryKey]::OpenBaseKey("LocalMachine","Default") $SubKey = $BaseKey.OpenSubkey($AdminsKey,$true) $SubKey.SetValue("IsInstalled",0,[Microsoft.Win32.RegistryValueKind]::DWORD) $SubKey = $BaseKey.OpenSubKey($UsersKey,$true) $SubKey.SetValue("IsInstalled",0,[Microsoft.Win32.RegistryValueKind]::DWORD) #Restart the computer for all changes to take affect Restart-Computer
Last thing we need to do for both servers is install some Windows pre-requisites. Make sure you have your Windows install disk mounted and on both servers run the following install script (note: the source is the sxs file on the install disk).
Import-Module ServerManager Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer –Source E:\Source\sxs
Next, we are going to install “AutoSPSourceBuilder”. This tool allows you to download all of the prerequisites, service packs (if any) and the latest CU\PU patches you wish to install. It will then write them all to a location of your choosing and prepare them for a slipstream installation. What’s really slick now is that it is an installable package for PowerShell.
Assuming this is a new server, you will need to install Nuget into PowerShell first. Determine the latest version:
Find-PackageProvider -Name "Nuget" -AllVersions
You should be prompted to install the latest version. If you wish to install it manually you can do so by:
Install-PackageProvider -Name "Nuget" -RequiredVersion "2.8.5.208" -Force
To run the AutoSPSourceBuilder package run the following command:
Install-Script -Name AutoSPSourceBuilder
Next, we are going to build a slipstream of SharePoint 2019. A slipstream install includes everything we need (prerequisites, patches, etc) to fully install the product. The command I am using will indicate the SP2019 source location, where I want to put the slipstreamed information, where to put the patches (UpdateLocation), which patch to get and to get all the pre-requisites SP2019 requires.
AutoSPSourceBuilder.ps1 -SharePointVersion "2019" -SourceLocation "D:" -Destination "C:\SPInstall\SP2019" -UpdateLocation "C:\SPInstall\SP2019\Patches" -CumulativeUpdate "January 2019" -GetPrerequisites
The final step is to copy the SPInstall\SP2019 folders to the other servers that SharePoint will be installed on. Once the process is complete you will find everything you need ready for the installation of Sharepoint 2019 (which we will take care of in the next post).
You can either run the same command on your other server(s) or simply copy over the SPInstall folder.
Prepare Web Server for Remote Setup
AutoSPInstaller will utilize Remote PowerShell to install SharePoint from the app server. But before that can happen we have to configure the web server for remote connections by PowerShell.
To configure the WFE server run the following PowerShell commands:
#Enable Credential Security Support Enable-WSManCredSSP –Role Server; #Disable Kerberos and Negotiate Authentication winrm set winrm/config/service/Auth @{Kerberos="false"}; winrm set winrm/config/service/Auth @{Negotiate="false"} #Allow Remote Server Management Configure-SMRemoting.exe -enable
To make sure the settings are setup properly run this command on the App server
Test-WSMan srv-sp2019WFE
If it was successful you will receive the following:
In the next blog, we will build the SharePoint 2019 AutoSPInstaller answer file and install SharePoint 2019.
Thanks for reading!
Comments