Remove Orphaned Server from SharePoint 2013 Farm [duplicate]
-
08-02-2021 - |
Pregunta
Looking for a supported method to remove orphaned servers from SharePoint 2013 Farm.
Initial process that led to current situation:
- Removed server from farm by using PSConfigGui
Upon navigation to Production Sites, server is still counted as a front-end for 3rd Party Licensing Purposes.
Still populated in Central Admin with Distributed Cache service still tagged on server.
Attempted to remove by clicking on Remove Server
Received Error:
cachehostinfo is null
Checking ULS Viewer revealed the following error
A failure occurred SPDistributedCacheServiceInstance::UnprovisionInternal()... isGraceFulShutDown 'False' , isGraceFulShutDown, Exception 'System.InvalidOperationException: cacheHostInfo is null at Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheServiceInstance.UnProvisionInternal(Boolean isGraceFulShutDown)'
Solución
$SPFarm = Get-SPFarm
$cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString()
$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq "ServerName"}
$serviceInstance.Delete()
Used search query:
sharepoint remove server cachehostinfo is null
Led me to the following Page: Habanero Consulting
Otros consejos
For SharePoint 2013, Microsoft's article at here describes the process.