Kill all Internet Explorer processes that have been running for more than 5 minutes using Powershell
问题 I would like to kill all Internet Explorer processes that have been running more than 5 minutes. This has to be a command in one line using Powershell v1.0. 回答1: Another way: get-process iexplore | ? { ([DateTime]::Now - $_.StartTime).TotalSeconds -gt 300 } | stop-process 回答2: Get-Process iexplore -ErrorAction SilentlyContinue | Where-Object { $_.StartTime -and (Get-Date).AddMinutes(-5) -gt $_.StartTime } | Stop-Process 回答3: At least at powershell v2 following command should stop all IE