eliminate extraneous information from format-table?

by Jul 31, 2011

Using Get-ChildItem and passing in a filesystem path object results in a directory listing:

15:20:37|# get-childitem .

 

 

    Directory: D:Documents and Settings200018252

 

 

Mode                LastWriteTime     Length Name

—-                ————-     —— —-

d—-         7/15/2011   8:15 AM            .ssh

d—-          3/9/2011  12:42 PM            Connect

d—-         7/29/2011   8:04 AM            Desktop

d—-          3/4/2011  12:19 PM            Favorites

d-r–         7/30/2011   3:07 PM            My Documents

d—-         7/26/2011   8:10 AM            pentadactyl

d-r–         7/30/2011  11:39 AM            Start Menu

d—-         6/14/2011  11:31 AM            Sun

d—-         3/15/2011  10:59 AM            Tracing

d—-         3/10/2011   1:14 PM            vimperator

-a—         7/17/2011  10:23 AM          0 .tora.tse

-a—         3/23/2011   2:57 PM      72080 g2mdlhlpx.exe

-a—         7/25/2011   1:41 PM        247 librariesDesktop.properties

-a—         7/25/2011   1:33 PM        153 librariesDesktopSession.properties

-a—         5/11/2011  11:07 AM      12114 networkDriveMapping.vbs

-a—          7/2/2011   6:12 PM         10 tryme.cmd

-a—          7/6/2011  12:06 PM         39 z.cmd

-a—          7/6/2011  12:06 PM         39 z.cmd~

-a—         7/30/2011  12:27 PM      13997 _viminfo

However, this listing has five lines of header information which I'd like to eliminate. Piping explicitly through the table formatter and using the -HideTableHeaders switch will eliminate the two lines of column headings:

15:26:32|# get-childitem . | Format-Table -HideTableHeaders

 

 

    Directory: D:Documents and Settings200018252

 

 

d—-         7/15/2011   8:15 AM            .ssh

d—-          3/9/2011  12:42 PM            Connect

d—-         7/29/2011   8:04 AM            Desktop

d—-          3/4/2011  12:19 PM            Favorites

d-r–         7/30/2011   3:07 PM            My Documents

d—-         7/26/2011   8:10 AM            pentadactyl

d-r–         7/30/2011  11:39 AM            Start Menu

d—-         6/14/2011  11:31 AM            Sun

d—-         3/15/2011  10:59 AM            Tracing

d—-         3/10/2011   1:14 PM            vimperator

-a—         7/17/2011  10:23 AM          0 .tora.tse

-a—         3/23/2011   2:57 PM      72080 g2mdlhlpx.exe

-a—         7/25/2011   1:41 PM        247 librariesDesktop.properties

-a—         7/25/2011   1:33 PM        153 librariesDesktopSession.properties

-a—         5/11/2011  11:07 AM      12114 networkDriveMapping.vbs

-a—          7/2/2011   6:12 PM         10 tryme.cmd

-a—          7/6/2011  12:06 PM         39 z.cmd

-a—          7/6/2011  12:06 PM         39 z.cmd~

-a—         7/30/2011  12:27 PM      13997 _viminfo

But there are still three lines before the first child item is listed (one blank, one with the directory path and then another blank).

I've looked at the xml for the table formatter and it is clearly not emitting these lines.

Can someone tell me a) what is emitting these lines and b) how to get rid of them?