8 lines
261 B
PowerShell
8 lines
261 B
PowerShell
Get-CimInstance Win32_Process |
|
|
Where-Object { $_.CommandLine -like '*serve.ps1*' } |
|
|
ForEach-Object {
|
|
Write-Host "Dung PID $($_.ProcessId)"
|
|
Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue
|
|
}
|
|
Start-Sleep -Seconds 2
|