Pickle
Pickle

Reputation: 1124

Test-Connection formatting returns blanks

I'm trying to use the Test-Connection command on a machine. If I use

Test-Connection TESTMACHINE

it works fine and returns results in the Source, Destination, IPV4Address, IPV6Address, Bytes, and Time(ms) columns. However, if I try and drill down the fields like so:

Test-Connection TESTMACHINE | Select-Object Destination, IPV4Address

it will only return the IPV4Address and the Destination column will be blank.

Is this an error with Powershell or am I doing something wrong?

Upvotes: 0

Views: 3553

Answers (1)

Arcass
Arcass

Reputation: 932

Check out the actual object returned. The property holding the destination name seems to be actually called "Address".

So try:

Test-Connection TESTMACHINE | Select-Object Address, IPV4Address

regards Arcass

Upvotes: 1

Related Questions