Syntax Question

Welcome Forums General PowerShell Q&A Syntax Question

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
5 years, 9 months ago.

  • Author
    Posts
  • #4384

    Participant
    Points: 2
    Rank: Member

    I'm having a brain lapse here.  It has been a long day I guess.

    Get-Service -servicename 'bits' | select status

    Returns a column header Status with Running.

    I just want to return Running.  I need to drop the header.

    I know this works

    (Get-Service -servicename 'bits').status

    I cannot do that because I need to return a bunch of stuff.

  • #4385

    Participant
    Points: 0
    Rank: Member

    What about this?

    Get-Service -servicename 'bits' | select  -expan status

     

  • #4393

    Participant
    Points: 2
    Rank: Member

    What about this?

    PowerShell

    Get-Service -servicename 'bits' | select -expan status

    1

    Get-Service-servicename'bits'|select-expanstatus

     

    Winner, winner, chicken dinner!  Thank you.  Like I said, long day.

The topic ‘Syntax Question’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort