关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回

Killpendingwindowsservice

发布时间:2022-07-27 13:55:01
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

/template/Home/DawnNew/PC/Static

立即注册风纳云账号,免费体验多款产品

立即注册