Skip to content

Checking IIS process based on a given Application Pool #10

@nhaberl

Description

@nhaberl

Hello,

as this agent is often also used for monitoring IIS web servers it would be beneficial to also add some paramtzers to the given process.
In terms of IIS all websites are processed by w3wp.exe but with different app pools.

maybe something like this

`function Check-IISWorkerProcess {
param (
[Parameter(Mandatory=$true)]
[string]$AppPoolName
)

$workerProcess = Get-Process -Name "w3wp" -ErrorAction SilentlyContinue | 
    Where-Object { $_.CommandLine -like "*-ap `"$AppPoolName`"*" }

if ($workerProcess) {
    return 1
} else {
    return 0
}

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions