Last active
August 11, 2023 15:24
-
-
Save avestura/70750e88996ba11f69ae3f9f37a0794d to your computer and use it in GitHub Desktop.
Slow down a Windows process by constantly suspend and resuming the process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use pssuspend to suspend and resume a process | |
# download at SysInternals Process Utilities | |
# https://learn.microsoft.com/en-us/sysinternals/downloads/pssuspend | |
$targetProcessId = 102030 | |
$freezeMS = 1000 | |
$resumeMS = 1 | |
while($true) { | |
pssuspend.exe $targetProcessId | |
start-sleep -Milliseconds $freezeMS | |
pssuspend.exe -r $targetProcessId | |
start-sleep -Milliseconds $resumeMS | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment