Skip to content

Instantly share code, notes, and snippets.

@briangordon
Last active June 3, 2017 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save briangordon/4b8aa7fb2f4ad6df85d938ac976a4168 to your computer and use it in GitHub Desktop.
Save briangordon/4b8aa7fb2f4ad6df85d938ac976a4168 to your computer and use it in GitHub Desktop.
Short PowerShell snippet I wrote for repeatedly dumping all running processes less than a minute old to a file
while($true) {
Get-Process | ? {$_.StartTime -gt (Get-Date).AddMinutes(-1)} | Select-Object ProcessName,Description,Path >> out.txt
sleep 0.01
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment