Last active
November 3, 2023 13:50
-
-
Save JohnL4/f7b199f67f7d3433ce12ff545f48672d to your computer and use it in GitHub Desktop.
Get processes WITH COMMAND LINES (must run as admin)
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
get-process node ` | |
| select id,starttime,name, | |
@{ Name="CommandLine"; | |
Expr={ $filter = "ProcessId = {0}" -f $_.Id; (Get-CimInstance Win32_Process -filter $filter).CommandLine }} ` | |
| ? {$_.CommandLine -match ' gulp\.js Build_'} ` | |
| sort starttime ` | |
| ft -au -wr | |
# Omit the filter on gulp.js for a fuller result. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment