停止缓存 - PowerShell Cmdlet
此 PowerShell Cmdlet 使用户能够停止指定服务器上的缓存以及正常停止缓存。它还允许用户停止指定服务器上的多个缓存。
Stop-Cache [-Name] [-IsGracefulStop] [-Port] [-Server] [-IsStopForMaintenance] [-Timeout] [-Credentials] [-NoLogo]
停止缓存示例 - PowerShell Cmdlet
- 此 PowerShell Cmdlet 使用端口 8250 停止本地服务器上名为 demoCache 的缓存。
Stop-Cache –Name demoCache
- 此 PowerShell Cmdlet 使用默认端口 20.200.20.11 停止服务器节点 8250 上缓存的名为 demoCache。
Stop-Cache –Name demoCache –Server 20.200.20.11
- 此命令停止正常存在于服务器 20.200.20.11 上的缓存 demoCache。
Stop-Cache -Name demoCache -Server 20.200.20.11 -IsGracefulStop
- 此命令将停止缓存以维护服务器 20.200.20.11 上现有的 demoCache 30 分钟。
Stop-Cache -Name demoCache -Server 20.200.20.11 -IsStopForMaintenance -Timeout 30
- 此命令停止服务器 20.200.20.11 和 20.200.20.12 上的 demoCache。
Stop-Cache -Name demoCache -Server "20.200.20.11,20.200.20.12"
查看房源
备注
名称上带有星号 (*) 的参数为必填参数,其余为可选参数。
参数 | 数据类型 | 课程描述 | 默认值 |
---|---|---|---|
-Name* |
<String> |
指定在服务器上注册的以逗号分隔的一个或多个缓存名称。 这些缓存在服务器上停止。 注意:仅在多个缓存的情况下指定逗号分隔的缓存名称。 | - |
-IsGracefulStop |
<SwitchParameter> |
如果用户希望服务器正常停止,即服务器不会被强制停止,则由用户提供。 | 假 |
-NoLogo |
<SwitchParameter> |
禁止显示标志横幅。 | 假 |
-Port |
<Integer> |
指定管理端口 NCache 如果服务器通道未使用默认端口,则服务器正在侦听。 | 8250 |
-Server |
<String> |
指定服务器名称,其中 NCache 服务正在运行并且用户想要停止该特定服务器节点上的缓存 | 本地机器 |
-IsStopForMaintenance |
<SwitchParameter> |
指定缓存是否为维护而停止。 | 假 |
-Timeout |
<Integer> |
指定高速缓存进行维护的时间间隔。 该值必须在 0 到 600 的范围内。 | 0 |
-Credentials |
<pscredential> |
指定授权访问指定操作所需的用户凭据。 这些凭据应属于在节点上具有适当权限的用户。 | - |