Get-Service winrm -Verbose
$winrmService=Get-CimInstance -ClassName win32_Service |? {$_.Name -eq "winrm"}
$id=$winrmService.ProcessId
$status=$winrmService.State
if(($id -ne 0) -and ($status -ne "Running"))
{
"it will kill winrm process"
kill -Id $id -Force -Verbose
winrm qc -q
}
Get-Service winrm -Verbose
相关文章
- 12-22如何让带证书的WCF服务 部署在以network service 帐户运行的Windows Service中 原创
- 12-22Window服务程序(windows service application)如何调试
- 12-22Redmine running under Mongrel as windows service
- 12-22创建一个Windows Service 程序
- 12-22kill正在占用端口的进程(mac | windows)
- 12-22windows python kill process
- 12-22How to debug windows service
- 12-22windows service 安装和卸载指令
- 12-22Windows 7安装Service Pack 1失败问题
- 12-22Windows service 2016 域服务1之创建域