I don’t know about you, but I really, REALLY hate GUIDs. I will never understand why Microsoft does not add a prompt in the SharePoint Product Configuration wizard that will allow you to name the Central Administration database. I guess they have their reasons…

On the other hand, I am not completely against installation UIs / wizards. A couple of years ago, I set out to completely install SharePoint 2013 by writing my own PowerShell, which included all the service applications like Managed Metadata, UPS, everything, and without using SP Installer or anything like that. It was a learning experience but I’m past it now, like I’m past multiplying 6 digit numbers by hand… 🙂

In any case, the SharePoint install technique that works best, IMO, is:

  1. Do a lot of prep work like setting up your servers (VMs), database, etc.. I spend a good bit of time there and will be blogging about that later.
  2. Make sure the server has access to the Internet before running SharePoint Prerequisites. If you don’t, it is much, much more painful. If at all possible, see if you can use a proxy to access the Internet for at least the period of the install. Again, I will have more to say about that later.
  3. Run the install wizard… Nothing difficult about that, and so far (knock on wood), I haven’t encountered any errors in that part of the install process.
  4. DO NOT RUN the SharePoint Products Configuration wizard without running the PowerShell to add your configuration database and Central Administration database first. If you do, you will get a GUID at the end of the CA database, and that is very, very ugly.

OK, so for Step #4, I am going to use PowerShell, but I’d like to do a bit of research first to see if anything has changed in SharePoint 2019 with the New-SPConfigurationDatabase command, for instance, any new parameters. The first step was to check out the Microsoft documentation on the subject. Next, I found a blog on Missing Parameters, which was useful. Additionally, if you want to do more than just create the 2 databases, read Trevor Seward’s post on the subject.

Finally, I decided to use the first part of a script posted here, which starts out by setting everything you will use as variables. There’s nothing really complicated about the first part of the script, which is essentially just creating the Configuration and Central Administration databases, but you do have to convert the Farm passphrase and the password for the Farm account. For whatever reason, the code to convert the password for the Farm account did not work for me (I kept getting an ‘invalid password’ error, though I knew the password was correct), so I ended up just using a ‘Get-Credential’ for the farm account credentials, and that worked fine.

I am posting my altered version of the script below for future reference. After running the script, I checked SQL Server and saw my 2 new databases. I also fanatically check the log-ins and permissions in SQL Server to make sure the Farm Account and the other accounts have the correct permissions. In the past, the number 1 problem that I’ve personally encountered with SharePoint turned out to be permissions of some sort or another, so I end up checking and re-checking them to avoid this sort of thing in the future…

In any case, the script to create the 2 databases is below. After this, I ran the SharePoint Products Configuration wizard because it still needs to do some stuff with the registry and a few other important things. (See this post for more information about what this wizard does.)

#KR: Run to configure SP2019. Based on script by Michael Wharton, https://github.com/MyProjectExpert/ProjectServerTools.
##===Load SharePoint DLLs if not loaded
if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
{
Add-PsSnapin Microsoft.SharePoint.PowerShell
}
 
cls
 
$DatabaseName             = "SP2019Test_Config" #config db name
$AdminContentDatabasename = "SP2019Test_AdminContent" #CA db name
$port                     = "100"
$WindowAuthProvider       = "NTLM"
$PassPhrase               = "PutYourP@ssphras3H3r3" #Farm passphrase
 
$DatabaseServer           = "SP2019TESTSQL" #SQL Server instance
$CentralAdminSite         = "http://SP2019MYSERVER:100"
 
#For some reason, the section below did not work. I kept receiving an error stating the password was incorrect. I changed the switch in 'new sp-configurationdatabase' to ask me for credentials, Get-Credential, instead of using the variables below.
#$AcctFarmAdmin            = "MYDOMAIN\sp_farm" #farm account
#$farmPass                 = "F@rmP@55w0r1" #farm account password
#$credFarmAdmin  = New-Object System.Management.Automation.PSCredential -ArgumentList #@($AcctfarmAdmin,(ConvertTo-SecureString -String $farmPass -AsPlainText -Force)

 
$AcctServiceSP            = "PARAMOUNT\spintra_service"
$servicePass              = "B$0sp1serv"
$credServiceSP = New-Object System.Management.Automation.PSCredential -ArgumentList @($AcctServiceSP,(ConvertTo-SecureString -String $servicePass -AsPlainText -Force))
 
New-SPConfigurationDatabase -DatabaseName $DatabaseName -DatabaseServer $DatabaseServer -AdministrationContentDatabaseName $AdminContentDatabasename -FarmCredentials (Get-Credential) -Passphrase (ConvertTo-SecureString -String $Passphrase -AsPlainText -Force) -LocalServerRole ApplicationWithSearch -Verbose