I was installing a new standalone SharePoint on my local VM. Post the installation, I started running the SharePoint Products Configuration Wizard. While running it, I received the following error,
The specified user ******* is a local account. Local accounts should only be used in stand alone mode.
Initially, I thought maybe I need to run it using the administrator account. However, the result was just the same!
Next, I tried running the New-SPConfigurationDatabase cmdlet. This command creates the SharePoint_ConfigDB database for us. However, it introduced a new error!
Server role parameter is required when creating or joining a farm
As it turns out, starting from SharePoint 2016, it’s compulsory to specify the MinRole value while creating the SharePoint Configuration database.
Now that the missing piece of the puzzle was found. We again ran the New-SPConfigurationDatabase cmdlet. This time with success!
New-SPConfigurationDatabase -DatabaseName SharePoint_ConfigDB -DatabaseServer [ServerName] -AdministrationContentDatabaseName SharePoint_ContentDB -Passphrase (ConvertTo-SecureString [password] -AsPlaintext -Force) -FarmCredentials (Get-Credential) -localserverrole SingleServerFarm
The key thing was to specify the Server Role, SingleServerFarm for the parameter, -localserverrole
MinRole has been introduced in SharePoint 2016. You can learn more about it here.
For us, it’s a compulsory field. If your wizard runs successfully then everything’s fine ’cause you will be prompted for it’s value.
However, if we’re creating the config_DB through powershell then, this is an additional parameter that should also be specified.
The argument is mapped to the enum, SPServerRole. However, not all values are supported. Valid values for, -localserverrole are,
|Custom||Available in SharePoint 2016 and later. Specifies that the server does not participate in the MinRole experience, in which services are automatically deployed to servers added to the farm based on their role. The SharePoint farm administrator must manually manage which service instances are provisioned on the server.|
|SingleServerFarm||Available in SharePoint 2016 and later. Specifies that the server is the only server in the SharePoint Foundation deployment.|
|Application||Specifies that the server is for back end jobs and is optimized for high throughput.|
|WebFrontEnd||Specifies that the server is a front-end Web server within the SharePoint Foundation deployment, and that the server is optimized for low request latency.|
|DistributedCache||Available in SharePoint 2016 and later. Specifies that the server hosts a distributed cache and optionally routes web requests.|
|Search||Available in SharePoint 2016 and later. Specifies that the server hosts Search services.|
- For local account issue, we might have to create the SharePoint_ConfigDB through PowerShell.
- MinRole has to be specified while running the, New-SPConfigurationDatabase cmdlet.
- The username, wherever prompted, should always be entered in the format, [domain\user].