Remove
Distributed Cache
Stop-SPDistributedCacheServiceInstance -Graceful Remove-SPDistributedCacheServiceInstance
Host
not found when issuing Remove command above
$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 $env:computername} $serviceInstance.Delete()
Add a
server and Start Distributed Cache service
Add-SPDistributedCacheServiceInstance
Stop
distributed cache service instance
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService" $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} $serviceInstance.Unprovision()
Start
distributed cache service instance
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService" $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} $serviceInstance.Provision()
Add
cache
New-Cache <CacheName>
Set timetolive
cache data
Stop-CacheCluster Set-CacheConfig -CacheName <cachename> -TimeToLiveMins 20 Start-CacheCluster
Remove
cache
Remove-Cache <CacheName>
Get
all cache available
Get-Cache | select CacheName
Get
cache statistic
Get-CacheStatistics <cachename>
No comments:
Post a Comment