I
I
Ilya bow2017-01-09 17:55:24
PowerShell
Ilya bow, 2017-01-09 17:55:24

Powershell command outputs multiple columns. How can I select (catch in a file) one of them? Is there a Powershell book for easier?

Team:

Test-Connection -count 1 -ComputerName (Get-Content test.txt)

The output is this:
Source        Destination     IPV4Address      IPV6Address                              Bytes    Time(ms)
------        -----------     -----------      -----------                              -----    --------
AP-ILYA       192.168.2.10    192.168.2.10     {}                                       32       3
AP-ILYA       ya.ru           213.180.204.3    {}                                       32       6

I want to receive Destination separately. How can this be done please?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem @Jump, 2017-01-09
@8889996

Test-Connection -count 1 -ComputerName (Get-Content test.txt)|Select Address

https://habrahabr.ru/post/242425/
https://geektimes.ru/post/47980/

A
athacker, 2017-01-09
@athacker

Test-Connection -count 1 -ComputerName (Get-Content test.txt)|Select Destination

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question