EFTScriptSamples/powershell/AWE_Reaper.ps1

7 lines
256 B
PowerShell
Raw Permalink Normal View History

2022-09-13 12:38:57 -05:00
$startTimeLimit = (get-date) - (new-timespan -minutes 2)
$processes_to_kill = get-process |
where {$_.StartTime -lt $startTimeLimit -and ($_.path -like "GSAWE.exe") }
if ($processes_to_kill -ne $null)
{
$processes_to_kill | foreach { $_.Kill() }
}