Windows Vista Forums

Formatting Output - without headers
  1. #1


    Carlos Felipe França da Fonseca Guest

    Formatting Output - without headers

    I get the following output with the command below:

    gwmi Win32_service -ComputerName | format-table SystemName, DisplayName,
    Name, ServiceType, StartMode, State, PathName, StartName

    SystemName DisplayName Name ServiceType StartMode
    State PathName StartName
    ---------- ----------- ---- ----------- --------- -----
    -------- ---------
    USMDSLAB204 Application... AeLookupSvc Share Process Auto
    Running C:\WINDOWS\... LocalSystem
    USMDSLAB204 Alerter Alerter Share Process Disabled
    Stopped C:\WINDOWS\... NT AUTHORIT...
    ..
    ..
    ..

    I would get the same list without the headers.
    How to do it?

    Thanks,

    Carlos Felipe





      My System SpecsSystem Spec

  2. #2


    Mark Schill Guest

    Re: Formatting Output - without headers

    Just add the -HideTableHeaders parameter of Format-Table

    On 1/17/2010 8:34 PM, Carlos Felipe França da Fonseca wrote:
    I get the following output with the command below:

    gwmi Win32_service -ComputerName | format-table SystemName, DisplayName,
    Name, ServiceType, StartMode, State, PathName, StartName

    SystemName DisplayName Name ServiceType StartMode
    State PathName StartName
    ---------- ----------- ---- ----------- ---------
    ----- -------- ---------
    USMDSLAB204 Application... AeLookupSvc Share Process Auto Running
    C:\WINDOWS\... LocalSystem
    USMDSLAB204 Alerter Alerter Share Process Disabled
    Stopped C:\WINDOWS\... NT AUTHORIT...
    ..
    ..
    ..

    I would get the same list without the headers.
    How to do it?

    Thanks,

    Carlos Felipe


      My System SpecsSystem Spec

  3. #3


    Carlos Felipe França da Fonseca Guest

    Re: Formatting Output - without headers

    Thank you, Mark!

    Now, I'm getting the following output:

    USMDSLAB204 Application... AeLookupSvc Share Process Auto
    Running C:\WINDOWS\... LocalSystem
    USMDSLAB204 Alerter Alerter Share Process Disabled
    Stopped C:\WINDOWS\... NT AUTHORIT...
    USMDSLAB204 Application... ALG Own Process Disabled
    Stopped C:\WINDOWS\... NT AUTHORIT...
    USMDSLAB204 Application... AppMgmt Share Process Manual
    Running C:\WINDOWS\... LocalSystem
    USMDSLAB204 Application... aqagent Own Process Auto
    Running "C:\Program... LocalSystem
    USMDSLAB204 ASP.NET Sta... aspnet_state Own Process Manual
    Stopped C:\WINDOWS\... NT AUTHORIT...

    I need to show the full string for all the columns, with no abbreviations.
    Is there any parameter I am missing?

    Here is the command:

    gwmi Win32_service -ComputerName $strServer | format-table SystemName,
    DisplayName, Name, ServiceType, StartMode, State, PathName,
    StartName -hidetableheaders | Out-File -filepath "Services.txt" -append

    Thank you again,

    Carlos Felipe França da Fonseca



    "Mark Schill" <Mark.Schill@newsgroup> wrote in message
    news:ODiRnG#lKHA.2132@newsgroup

    > Just add the -HideTableHeaders parameter of Format-Table
    >
    > On 1/17/2010 8:34 PM, Carlos Felipe França da Fonseca wrote:
    > I get the following output with the command below:
    >
    > gwmi Win32_service -ComputerName | format-table SystemName, DisplayName,
    > Name, ServiceType, StartMode, State, PathName, StartName
    >
    > SystemName DisplayName Name ServiceType StartMode
    > State PathName StartName
    > ---------- ----------- ---- ----------- ---------
    > ----- -------- ---------
    > USMDSLAB204 Application... AeLookupSvc Share Process Auto Running
    > C:\WINDOWS\... LocalSystem
    > USMDSLAB204 Alerter Alerter Share Process Disabled
    > Stopped C:\WINDOWS\... NT AUTHORIT...
    > .
    > .
    > .
    >
    > I would get the same list without the headers.
    > How to do it?
    >
    > Thanks,
    >
    > Carlos Felipe
    >

      My System SpecsSystem Spec

  4. #4


    BJ Guest

    Re: Formatting Output - without headers

    On 18 Jan., 06:29, Carlos Felipe França da Fonseca
    <carlosfelipefra...@newsgroup> wrote:

    > Thank you, Mark!
    >
    > Now, I'm getting the following output:
    >
    > USMDSLAB204 * *Application... AeLookupSvc * *Share Process *Auto
    > Running * * * *C:\WINDOWS\... LocalSystem
    > USMDSLAB204 * *Alerter * * * *Alerter * * * *Share Process *Disabled
    > Stopped * * * *C:\WINDOWS\... NT AUTHORIT...
    > USMDSLAB204 * *Application... ALG * * * * * *Own Process * *Disabled
    > Stopped * * * *C:\WINDOWS\... NT AUTHORIT...
    > USMDSLAB204 * *Application... AppMgmt * * * *Share Process *Manual
    > Running * * * *C:\WINDOWS\... LocalSystem
    > USMDSLAB204 * *Application... aqagent * * * *Own Process * *Auto
    > Running * * * *"C:\Program... LocalSystem
    > USMDSLAB204 * *ASP.NET Sta... aspnet_state * Own Process * *Manual
    > Stopped * * * *C:\WINDOWS\... NT AUTHORIT...
    >
    > I need to show the full string for all the columns, with no abbreviations..
    > Is there any parameter I am missing?
    >
    > Here is the command:
    >
    > gwmi Win32_service -ComputerName $strServer | format-table SystemName,
    > DisplayName, Name, ServiceType, StartMode, State, PathName,
    > StartName -hidetableheaders | Out-File -filepath "Services.txt" -append
    >
    > Thank you again,
    >
    > Carlos Felipe Fran a da Fonseca
    >
    > "Mark Schill" <Mark.Sch...@newsgroup> wrote in message
    >
    > news:ODiRnG#lKHA.2132@newsgroup
    >

    > > Just add the -HideTableHeaders parameter of Format-Table
    >

    > > On 1/17/2010 8:34 PM, Carlos Felipe Fran a da Fonseca wrote:
    > > I get the following output with the command below:
    >

    > > gwmi Win32_service -ComputerName | format-table SystemName, DisplayName,
    > > Name, ServiceType, StartMode, State, PathName, StartName
    >

    > > SystemName * * DisplayName * *Name * * * * * ServiceType * *StartMode
    > > State * * * * *PathName * * * StartName
    > > ---------- * * ----------- * *---- * * * * * ----------- * *---------
    > > * *----- * * * * *-------- * * * ---------
    > > USMDSLAB204 * *Application... AeLookupSvc * *Share Process *Auto Running
    > > C:\WINDOWS\... LocalSystem
    > > USMDSLAB204 * *Alerter * * * *Alerter * * * *Share Process *Disabled
    > > Stopped * * * *C:\WINDOWS\... NT AUTHORIT...
    > > .
    > > .
    > > .
    >

    > > I would get the same list without the headers.
    > > How to do it?
    >

    > > Thanks,
    >

    > > Carlos Felipe
    Hello Carlos Felipe,
    just add the Parameter -AutoSize

    Best Regards
    BJ

      My System SpecsSystem Spec

Formatting Output - without headers problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting output Carlos Felipe França da Fonseca PowerShell 2 02 Sep 2009
Formatting output elmerick PowerShell 3 26 Apr 2009
Re: Get-childitem output formatting Shay Levy [MVP] PowerShell 0 02 Mar 2009
formatting AD output Kev T PowerShell 8 01 Feb 2008
get-help output formatting bug klumsy@xtra.co.nz PowerShell 1 11 Nov 2006