Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

test-connection to format-table

$
0
0

Hi

I wonder why I do need to use other column headers when pipelining test-connection to format-table?

...Using test-connection...

test-connection 192.168.1.1
Source    Destination   IPV4Address   IPV6Address   Bytes   Time(ms)
------    -----------   -----------   -----------   -----   --------
COMP123   192.168.1.1   192.168.1.1                 32      1


...just using format-table - still OK...

test-connection 192.168.1.1 | format-table
Source    Destination   IPV4Address   IPV6Address   Bytes   Time(ms)
------    -----------   -----------   -----------   -----   --------
COMP123   192.168.1.1   192.168.1.1                 32       1


...but format-table and headers doesn't work:

test-connection 192.168.1.1 | format-table Source, Destination, IPV4Address, Bytes, Time
Source    Destination   IPV4Address   IPV6Address   Bytes   Time
------    -----------   -----------   -----------   -----   ----
                        192.168.1.1

...I have to use other parameters as headers

test-connection 192.168.1.1 | format-table __SERVER, Address, ProtocolAddress, BufferSize, ResponseTime
__SERVER   Address      ProtocolAddress   BufferSize   ResponseTime
--------   -------      ---------------   ----------   ------------
COMP123    192.168.1.1  192.168.1.1       32           1

 

Lg
Marcello


Viewing all articles
Browse latest Browse all 6937

Trending Articles