Source of Windows Processes (Task Manager) Command Line Property?

Welcome Forums General PowerShell Q&A Source of Windows Processes (Task Manager) Command Line Property?

Viewing 2 reply threads
  • Author
    Posts
    • #227716
      Participant
      Topics: 2
      Replies: 8
      Points: 61
      Rank: Member

      Hello,

      I’m failing to do what should be simple, determine the command line property of a running process just like ‘Windows Task Manager’ displays when adding the command line column/property (I would put in a screen shot at this point but no idea how!).

      I’m particularly interested in knowing how my various java process are performing but I cannot tell one java process from another, as they just say “java.exe”…. not helpful. I have tried the following:

      and

      In both cases I get only the process name (java or java.exe) and nothing for the command line. I’m new to PowerShell so please don’t dismiss the obvious, can anyone help explain why I’m not able to determine the command line details when they must surely be there somewhere?

      Thanks a lot.

    • #227731
      Participant
      Topics: 7
      Replies: 2458
      Points: 6,439
      Helping Hand
      Rank: Community MVP
    • #227755
      Participant
      Topics: 2
      Replies: 8
      Points: 61
      Rank: Member

      Hello again Olaf,

      Thanks for coming to my rescue once more, and again it was a combination of things. I ran your command and got exactly the same result, process name but no command line details which got me thinking.

      So I opened PowerShell as ‘Administrator’ and ran the same command, bingo!! In fact the ‘Get-WmiObject’ I tried also works as administrator (get-process just doesn’t do it but no bother) suggesting that Windows Task Manager must run as administrator somehow without me asking.

      Thanks again for your help, I’ll run these scripts as Administrator from now on. Cheers.

Viewing 2 reply threads
  • The topic ‘Source of Windows Processes (Task Manager) Command Line Property?’ is closed to new replies.