New-SPConfigurationDatabase – Error “Given key was not present in the directory”

During configuration of a new SharePoint 2019 farm I got an error in PowerShell Cmdlet New-SPConfigurationDatabase.

The given key was not present in the directory.

I found some hints… E.g.: http://alstechtips.blogspot.com/2014/04/sharepoint-2013-given-key-was-not.html

I checked the farm account used with the Cmdlet.

I found that the farm account did not have “Read” permission for “All Authenticated Users”.

After granting this permission the Cmdlet succeeded.

Set TLS Version in PowerShell

It has been described lots of times before. It’s just for the records…

This code sets the used TLS version for secure HTTP connections to version 1.2

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Here are the valid values:

SystemDefault
Ssl3
Tls
Tls11
Tls12

The latests supported version depends on your .NET Framework. On Windows 10 20H2 the setting Tls13 will work too.

With this code you can list the valid values:

[Net.SecurityProtocolType]::GetNames([Net.SecurityProtocolType])