tinuwalther / PsNetTools

PsNetTools is a cross platform PowerShell module to test network features on Windows, Linux and Mac.

Home Page:https://tinuwalther.github.io/posts/psnettools.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix Return in Test-PsNetDig if host is not known

tinuwalther opened this issue · comments

Currently, the function returned an error-object like this:

Succeeded             : False
Function              : Test-PsNetDig(myserver2.contoso.com)
FullyQualifiedErrorId : SocketException
ErrorMessage          : Exception calling "GetHostEntry" with "1" argument(s): "No such host is known"
ErrorCategory         : NotSpecified
CategoryActivity      : 
CategoryTargetName    : 
ExceptionFullName     : System.Management.Automation.MethodInvocationException

The return should have the same output-format as the host is known like this:

Succeeded   : Fasle
InputString : myserver2.contoso.com
Destination : No such host is known
IpV4Address : 
IpV6Address : 
TimeMs      : 0

Fixed in Release 0.7.72