From a8e17b6cb60204a939814253e6482226b23a0095 Mon Sep 17 00:00:00 2001 From: jblu Date: Wed, 4 May 2022 10:24:26 -0500 Subject: [PATCH] Testing concept to close gsawe.exe --- powershell/AWE_Reaper.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 powershell/AWE_Reaper.ps1 diff --git a/powershell/AWE_Reaper.ps1 b/powershell/AWE_Reaper.ps1 new file mode 100644 index 0000000..d39d852 --- /dev/null +++ b/powershell/AWE_Reaper.ps1 @@ -0,0 +1,7 @@ +$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() } +} \ No newline at end of file