Stop-SPDistributedCacheServiceInstance

Stops an instance of the Distributed Cache service on a local server.

Syntax

Stop-SPDistributedCacheServiceInstance
    [-Graceful]
    [-AssignmentCollection <SPAssignmentCollection>]
    [<CommonParameters>]

Description

Use the Stop-SPDistributedCacheServiceInstance cmdlet to stop an instance of the Distributed Cache service on a local server. While a -Graceful switch does exist, this cmdlet is not capable of properly transferring cached items to another Distributed Cache host within the farm. Follow the guidance available at Manage the Distributed Cache service in SharePoint Server 2013 to properly issue a graceful shutdown of the Distributed Cache service.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples

------------ Example 1 ----------

Please see referenced article instead of using this cmdlet directly.

Parameters

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Graceful

Specifies whether to gracefully stop an instance of the Distributed Cache service.

Type:SwitchParameter
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition