how to view all get-service properties on one screen

This topic contains 5 replies, has 4 voices, and was last updated by  Bob McCoy 2 years, 3 months ago.

  • Author
  • #36748

    nick c

    I'm new to learning powershell and have been going through the powershell in a month of lunches book. I'm testing to see if there is a way to view all of the get-service properties on one screen. I've already tried gsv | select -property * | ft -autosize , but noticed that its missing the Status property that shows if a service is running or not.

  • #36753

    H Man

    try this gsv | fl *

  • #36755

    Michael Maher

    I don't think you were far off in your code. As you're just testing out command capabilities I'd limit it to good old BITS

    Out-GridView might be easier on the eye too, for presentation of results often there is no right way and it boils down personal preference.

    gsv BITS | select -property * | ogv
  • #36766

    nick c

    I tried gsv | fl * , it seems to have all of the properties, but is there any reason I can't get it to work in a table view instead of list view? I just think it's easier to look at.

  • #36771

    Michael Maher

    How about a custom table . . .

    $a = @{Expression={$_.Name};Label="Name";width=25}, 
    @{Expression={$_.CanStop};Label="Can Stop";width=40}
    Get-Service | Format-Table $a

    Second thoughts, this is easier

    gsv * | ft -AutoSize
  • #36803

    Bob McCoy

    The short answer is, no. There are too many properties to list in table format in the console unless you make the console very wide.

    It's unclear here what you are ultimately trying to accomplish. If all you want to do is see all the properties and you don't like list view, then try the grid view.

    Get-Service | select -Property * | Out-GridView

You must be logged in to reply to this topic.