Need the Farm name:$SPFarm = Get-SPFarmNeed the Cache Name:$cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString()Need to use local (only) server as ClusterManager:$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::LocalNeed the Cluster name:$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName)Need the Instance name:$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"Need the service instance for the missing <computername>$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq "<computername>"}Need to delete the instance reference:$serviceInstance.Delete()
Monday, 3 February 2014
Delete Distribute cache using PowerShell
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment