Tuesday, May 6, 2014
vb script for App Pool
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
Set oWorkerProcesses = oWebAdmin.InstancesOf("WorkerProcess")
For Each oWorkerProcess In oWorkerProcesses
' Place the requests queued for a process into an array variable.
oWorkerProcess.GetExecutingRequests arrReqs
' Show the number of requests queued.
If IsNull(arrReqs) Then
WScript.Echo "No currently executing requests."
Else
' Display the number of requests.
WScript.Echo "Number of currently executing requests: " & _
UBound(arrReqs) + 1
WScript.Echo
' List the properties of each request.
For Each oRequest In arrReqs
WScript.Echo "SiteID:" & "[" & oRequest.siteid & "]" & " Module: " & "[" & oRequest.CurrentModule & "]" & " ClientIPAddress:" & "[" & oRequest.ClientIPAddress & "]" & " LocalIPAddress:" & "[" & oRequest.LocalIPAddress & ":" & oRequest.LocalPort & "]" & " PipelineState:" & "[" & oRequest.PipelineState & "]" & " Verb:" & "[" & oRequest.Verb & "]" & " HostName: " & "[" & oRequest.HostName & "]" & " Url: " & "[" & oRequest.Url & "]" & " TimeElapsed: " & "[" & oRequest.TimeElapsed & "]" & " TimeInModule:" & "[" & oRequest.TimeInModule & "]"
WScript.Echo
Next
End If
Next
Save this fine as .vbs and runt it with command prompt.
Subscribe to:
Posts (Atom)