Type "Get-SPServer" to get the current server list:
Example:
Server types:
WebFrontEnd
Application
DistributedCache
Search
Custom
Single-server farm*
For example we want to change SERVER1 role to "WebFrontEnd"
Set-SPServer -Identity SERVER1 -Role WebFrontEnd
If you get error:
Set-SPServer : SERVER1: The Distributed Cache service instance must be removed. Run 'Remove-SPDistributedCacheServiceInstance' on this server to remove the Distributed Cache service instance.
At line:1 char:1
+ Set-SPServer -Identity SERVER1 -Role WebFrontEnd
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Set-SPServer], PSArgumentException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletSetServer
Fix it by running "Remove-SPDistributedCacheServiceInstance" on that server and if everything goes well you can run "Set-SPServer -Identity SERVER1 -Role WebFrontEnd" once again.
After that you can check server role by running command "Get-SPServer" or visiting your farm site:
http://*spfarm*/_admin/FarmServers.aspx
References:
- https://technet.microsoft.com/en-us/library/mt346114(v=office.16).aspx
- http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=605
- http://nikcharlebois.com/change-a-servers-minrole-in-sharepoint-2016-2/
No comments:
Post a Comment