Fork me on GitHub

在SharePoint 2013 场中移除服务器,提示 cacheHostInfo is null 错误

Problem

在SharePoint 2013 场中移除服务器,提示 cacheHostInfo is null 错误

Resolution

这是由于SharePoint 2013中分布式缓存实例(Distributed Cache)在此服务器上已被注册,如果需要将此服务器从SharePoint 场里移除,首先必须将分布式缓存实例在此服务器上删除。

所以,通过PowerShell,得到分布式缓存实例,然后将其删除即可。

  • 获取实例名

  • 删除此Distributed Cache实例(比如该实例在GCP-WEB 01这台服务器上被注册)

  • 完整PowerShell 代码如下
Add-PSSnapin Microsoft.SharePoint.PowerShell
$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 "Your Server Name"}
$serviceInstance.Delete()

 

posted @ 2015-02-15 13:57  木宛哥说编程  阅读(1009)  评论(0编辑  收藏  举报
multifunction lasers
访问人数