I'm trying to auto kill a process via batch script in Windows Server 2016. The process should be killed if the Memory usage of any process is above 12GB.
There is already a Version to kill processes below the maximum INT value: kill process if it exceeds 6GB
This does NOT work for bigger values than INT can handle. You can't kill a task bigger than 2,147,483,647 x 2.
So
taskkill /F /FI "MemUsage gt 12000000000"
results in
ERROR: The search filter cannot be recognized.
Any idea how to circumvent the (32-Bit) Limit in the MemUsage filter given by the Integer Range?
Taskkill documentation: https://ss64.com/nt/taskkill.html
Solved. See Comment from Daemon-5: