How to remove SharePoint server from farm?
As per the Technet article, Remove a server from a farm in SharePoint 2013, Use Add/Remove Programs from “Control Panel” to remove SharePoint 2007/2010/2013 servers from the Farm.
- Control Panel >> Add/Remove programs >> Microsoft SharePoint Server 2013 >> Remove
Make sure that the user account performing this procedure is a member of the Local Administrators group.
However, If you try to rebuild SharePoint on the server, I would prefer to use the “Disconnect this server from farm” option on PSCONFIG wizard. To remove the SharePoint server from the farm, Run “SharePoint Products Configuration Wizard” (psconfigui) and choose “Disconnect from this server farm option” and then run through the wizard.
Once the wizard completed successfully on the server that you want to remove from the farm, that server won’t be part of your SharePoint farm anymore! You can run the wizard again to join the server at anytime if needed.
Remove SharePoint server from farm with PowerShell:
Here is the PowerShell way to remove SharePoint server from farm. Run this PowerShell command from the target server:
PSCONFIG command line to remove a SharePoint server from an existing farm:
psconfig –cmd configdb -disconnect
Basically, these command line and PowerShell cmdlets does the same things as SharePoint Products Configuration wizards disconnecting server from farm. But wait! Are we completely done? No! There could be several artifacts left in the server such as Server Roles, IIS directories, Logs, Registry keys, etc. So, I would recommend doing a fresh install of OS and SharePoint for a clean server rebuild.