我试图在机器上使用Test-Connection命令。如果我使用
Test-Connection TESTMACHINE
它工作正常,并在Source,Destination,IPV4Address,IPV6Address,Bytes和Time(ms)列中返回结果。但是,如果我尝试深入研究这样的字段:
Test-Connection TESTMACHINE | Select-Object Destination, IPV4Address
它只返回IPV4Address,而Destination列将为空白。
这是Powershell的错误还是我做错了什么?
答案 0 :(得分:1)
查看返回的实际对象。保存目标名称的属性实际上实际上称为“地址”。
所以试试:
Test-Connection TESTMACHINE | Select-Object Address, IPV4Address
问候 Arcass