Change a Server’s MinRole in SharePoint 2016

So you went ahead and installed SharePoint 2016 for the first time, but now when running the PSConfig wizard, you are presented with a new screen you’ve never seen or heard of before? Yeah, that is called the MinRole, and it’s a shiny new feature in SharePoint 2016. Actually, without a single doubt, it is the biggest noticeable change you will see in the SharePoint 2016 IT Preview compared to previous versions of SharePoint. MinRoles are based on configuration best practices that Microsoft has established over the years. It automatically enables and configure specific services on the SharePoint server based on the role it was assigned. The PSConfig wizard screen that is made available in the SharePoint 2016 IT Preview looks like the following:

Now, the first question that probably comes to mind when playing with those bits for the first time, is “What role should I choose”? Followed by “What if I pick the wrong one, can I change it after?” In order to help you determine what role to choose, Microsoft has developed a great TechNet article that goes in length about what each role does ( ), so I will let them answer the first question, but to answer the second question, yes you can change it after you selected one. The SharePoint 2016 Preview includes an administrative page in Central Administration to allow you to quickly change a role, but we’re not interested in that! Let’s look at how it can be achieved using PowerShell.

Before we get started I go into the details of how to change the MinRole assigned to a server in your farm, let’s take a step back for a minute and look at how MinRole are actually assigned. When using the PSConfig wizard to create a new farm, what we are really doing in the background (from a PowerShell perspective) is call the New-SPConfigurationDatabase cmdlet (and a whole bunch of other ones as well off course). It is this cmdlet that got updated in SharePoint 2016 to receive the MinRole parameter. This cmdlet now accepts a new parameter called –LocalServerRole which specifies the MinRole to assign to a server. However, if you are using the PSConfig wizard to join a server to an existing farm, the cmdlet being used is called Connect-SPConfigurationDatabase, and just like the other cmdlet, this one has been updated in SharePoint 2016 to also accept a new parameter called –LocalServerRole. The value for these roles is obtained from Microsoft.SharePoint.Administration.SPServerRole. Using PowerShell we can easily extract the available values from this list:

Add-PSSnapin Microsoft.SharePoint.PowerShell


Now that we are done with the theory part, let’s get our hands dirty. In my scenario, I have created a new farm with a single server in it (for dev purposes off course J). When using the initial PSConfig wizard, I selected my server to run the Search MinRole. However, I now want to change it to use the Single Farm MinRole. What I need to do first is to disconnect my server from the farm’s Configuration Database. This can be achieved by calling the Disconnect-SPContentDatabase PowerShell cmdlet. Note that you may need to close an re-open the SharePoint Management Shell after running this operation.

Disconnect-SPConfigurationDatabase -Confirm:$False

Now that the server has been properly disconnected from the Configuration Database, we need to join it back to the farm calling the Connect-SPConfigurationDatabase PowerShell cmdlet, but this time passing the new value for its MinRole, in our case SingleServerFarm.

$PassPhrase = ConvertTo-SecureString “pass@word1” -AsPlainText -Force

Connect-SPConfigurationDatabase -DatabaseServer “.” -DatabaseName “SharePoint_Config” -PassPhrase $PassPhrase -LocalServerRole “SingleServerFarm”

Once the operation completes, your server will be joined to the farm, and be assigned the new specified MinRole!

*Note: You may have to re-run PSConfig after reconnecting to the Configuration Database for your changes to kick in.

4 thoughts on “Change a Server’s MinRole in SharePoint 2016

  1. Why do i need to disconnect server from the farm, if i just want to change server role? the role basically means which services are running on that particular server. Am i wrong?

    1. In the first IT Preview, PowerShell was the only way to change the MinRole of a server and you had to disconnect/reconnect. With Beta 2, you can achieve this via the Central Administration. Please note however that in the background it is still deconnecting the server and reconnecting it to the farm.

  2. Hi,
    I would like to know if it is possible to have multiple roles on a server. For Instance if I want App server and distributed cache roles combined in 2 servers? this Minrole approach takes too many servers and 3 just for distributed cache. Quite expensive setup. So can you please let me know if this is possible or I would have to move back to old style farm setup?

    1. A server cannot be assigned two roles. You can however assign it the custom role and then manually decide what services to run on it. Think of custom role as how SP 2013 currently works, where there are not limitations on what you can do on the server.

Leave a Reply to Nik Charlebois Cancel reply

Your email address will not be published. Required fields are marked *