Skip to content

Instantly share code, notes, and snippets.

@egre55
Last active July 16, 2024 13:03
Show Gist options
  • Save egre55/816ddb91016034dcf747f4ea5f054767 to your computer and use it in GitHub Desktop.
Save egre55/816ddb91016034dcf747f4ea5f054767 to your computer and use it in GitHub Desktop.
procmon.ps1
# Simple PowerShell process monitor
while($true)
{
$process = Get-WmiObject Win32_Process | Select-Object CommandLine
Start-Sleep 1
$process2 = Get-WmiObject Win32_Process | Select-Object CommandLine
Compare-Object -ReferenceObject $process -DifferenceObject $process2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment