During configuration of a new SharePoint 2019 farm I got an error in PowerShell Cmdlet
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.
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:
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: