Skip to content

Instantly share code, notes, and snippets.

@avestura
Last active August 11, 2023 15:24
Show Gist options
  • Save avestura/70750e88996ba11f69ae3f9f37a0794d to your computer and use it in GitHub Desktop.
Save avestura/70750e88996ba11f69ae3f9f37a0794d to your computer and use it in GitHub Desktop.
Slow down a Windows process by constantly suspend and resuming the process
# 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