Bug in Test-NetConnection gives both "PingSucceeded: False" and "TcpTestSucceeded : True" but "PingSucceeded: True" without -Port
On Windows 10 using Powershell 5.1 the Test-NetConnection looks like it has a bug when invoked using the -Port parameter. The cmdlet Test-NetConnection gives both "PingSucceeded: False" and "TcpTestSucceeded : True" despite the fact the target host does respond to ICMP-- however when provided only -Computername $IPAddress then it returns "PingSucceeded: True" which is correct. It appears that a successful result when using -Port affects how the cmdlet reports PingSucceeded. When the port is closed, then it reports "PingSucceeded: True" This behavior happens when using either IP address or FQDN for -Computername. Can anyone confirm if this is by design? Seems more like a bug.