Skip to content

Instantly share code, notes, and snippets.

@tcartwright
Last active August 29, 2024 18:13
Show Gist options
  • Save tcartwright/5ec46925755a837061379f0a29826440 to your computer and use it in GitHub Desktop.
Save tcartwright/5ec46925755a837061379f0a29826440 to your computer and use it in GitHub Desktop.
POWERSHELL: Get W3WP ProcessId for specific app pool name
Get-WmiObject Win32_Process -Filter "name = 'w3wp.exe'" |
Where-Object {$_.CommandLine -imatch "appPoolName"} |
Select-Object ProcessId, Name, CommandLine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment