< Back

Get-NetworkConnectionHost

Sat Jan 18, 2020 5:03 pm

NAME Get-NetworkConnectionHost



SYNOPSIS

Returns host name and IP address from a provided hostname or IP address.





SYNTAX

Get-NetworkConnectionHost [[-Host] <String[]>] [<CommonParameters>]





DESCRIPTION

The Get-NetworkConnectionHost cmdlet gets host name and IP address from a provided hostname or IP address.





PARAMETERS

-Host [<String[]>]

Host name/IP address to resolve.



Required? false

Position? 0

Default value

Accept pipeline input? true(ByValue,ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS











OUTPUTS











Example 1: Get the host name and IP address from local host.



PS C:\\>Get-NetworkConnectionHost



This command lists the host name and IP Address of the local host.

Example 2: Get resolve multiple entries.



PS C:\\>Get-NetworkConnectionHost -Host 192.168.0.10,codecloudandrants.io,google.com



This command resolves the host name/IP Address of 192.168.0.10 and codecloudandrants.io.

Example 3: Resolve multiple entries from pipeline..



PS C:\\>"codecloudandrants.io","google.com" | Get-NetworkConnectionHost



This command resolves the host name/IP Address of 192.168.0.10 and codecloudandrants.io.

Example 4: resolve entries from Get-NetworkConnection that has process name chrome.



PS C:\\>Get-NetworkConnection -ProcessName chrome | Get-NetworkConnectionHost



Get all connections with process name chrome and resolve the RemoteAddress of these with Get-NetworkConnectionHost.



RELATED LINKS