How to start and stop Distributed Cache Service using SharePoint Management Shell?
# Start the Distributed Cache service by using Windows PowerShell
$InstanceName = "SPDistributedCacheService Name=AppFabricCachingService";
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision();
# Stop the Distributed Cache service by using Windows PowerShell
$instanceName = "SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision();
# Start the Distributed Cache service by using Windows PowerShell
$InstanceName = "SPDistributedCacheService Name=AppFabricCachingService";
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Provision();
# Stop the Distributed Cache service by using Windows PowerShell
$instanceName = "SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision();
No comments:
Post a Comment