I logged in my Windows Server 2012 R2 with the account svc_install which has administrators permissions as it belongs in the administrators group.
I installed the prerequisites and ran the setup for SharePoint 2016 server. I did not run the SharePoint configuration wizard as I wanted to install the rest of sharepoint using powershell.
I started by adding Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
then I got the error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.
OK, so I tried to use Add-SPShellAdmin -UserName contoso\svc_install
then I got the following error:
Add-SPShellAdmin : Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again.
Why on earth can't it just run normally but all this fuss? By the way, I have opened/ran the powershell console as administrator
.
NOTE: at this moment there are no SharePoint databases created.