2026-09-10 22:31:45 +08:00
|
|
|
# 统计正在运行的 自动重启DSH.bat 守护窗口数量(防重复判断用)
|
|
|
|
|
$n = (Get-CimInstance Win32_Process -Filter "Name='cmd.exe'" -ErrorAction SilentlyContinue).Where({ $_.CommandLine -match '自动重启DSH\.bat' }).Count
|
|
|
|
|
if ($null -eq $n) { $n = 0 }
|
|
|
|
|
Write-Output $n
|