Get-Process ? newbie question

Welcome Forums General PowerShell Q&A Get-Process ? newbie question

Viewing 2 reply threads
  • Author
    Posts
    • #270706
      Participant
      Topics: 1
      Replies: 1
      Points: 14
      Rank: Member

      Hi

      I am brand new to this and is learning the command Get-Process | ft name, cpu, starttime, Company,

      If i run a “get-process” I get the headlines     Status    Name    DisplayName

      nothing else

      It is however possible to run

      Get-Process | ft name, cpu, starttime, Company, path -wrap -GroupBy Company

      and I see the headlines mentioned in the command (name, cpu, starttime etc)

      How am i supposed to know, that Get-Process contains the possibility of showing the added headlines?

      I would expect a command like “Get-Process -detail” but i cannot find a command like that.

      I hope im not to unclear.

      /Vejling

       

    • #270712
      Participant
      Topics: 16
      Replies: 1855
      Points: 3,568
      Helping Hand
      Rank: Community Hero

      When you pipe to Format-Table (ft), you’re piping all properties and telling Format-Table you only want to see select properties. Be with Format-Table, it is ONLY made to display formatted for the shell. No data is passed beyond most Format-* commands, so you cannot do Get-Process | Format-Table | Stop-Process, one of Powershell’s Gotchas (see the ebook in the Free Resources). Here is a basic answer to your question:

    • #270715
      Participant
      Topics: 1
      Replies: 1
      Points: 14
      Rank: Member

      Thank you very much Rob.

      Imagine all people being that helpful. I hope I will be able to pass on the kindness sometime.

       

      Best regards

      /Vejling

Viewing 2 reply threads
  • You must be logged in to reply to this topic.