« Previous Next »

Thread: How do I loop out al fields inside SELECT * FROM WorkerProcess

Last post 10-24-2009 3:24 PM by ksingla. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 10-21-2009, 11:53 PM

    How do I loop out al fields inside SELECT * FROM WorkerProcess

    I want to know what are all the fields available inside WorkerProcess table

    reason is: I want to query the worker process id and worker process name.

    This is very important for me. Any way for me retrieve the data?


    Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
    Set oW3WPs = oWebAdmin.ExecQuery( "SELECT * FROM WorkerProcess" )

    For Each oW3WP In oW3WPs
         
         oW3WP.GetExecutingRequests arrReqs                   
                 
             For Each oRequest In arrReqs

                 WScript.Echo "--start--"
                 WScript.Echo "process id: " + oRequest.ProcessID
                 WScript.Echo "process name: " + oRequest.ProcessName

             Next
    Next


  • 10-24-2009, 3:24 PM In reply to

    • ksingla
    • Top 25 Contributor
    • Joined on 06-14-2006, 3:02 AM
    • Redmond, WA
    • Posts 863

    Re: How do I loop out al fields inside SELECT * FROM WorkerProcess

    You can browse through WMI namespace using CIM studio. You can dowload it from here.

    Thanks,
    Kanwal

    Follow me on twitter at http://twitter.com/kjsingla
Page 1 of 1 (2 items)
Microsoft Communities