Last active
July 16, 2024 13:03
-
-
Save egre55/816ddb91016034dcf747f4ea5f054767 to your computer and use it in GitHub Desktop.
procmon.ps1
This file contains 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
# 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