1 |
(((@(Get-NetTCPConnection).RemoteAddress | % {if($_ -notcontains (Get-NetIPAddress).IPv4Address -and ($_ -notcontains "::") -and ($_ -notcontains "0.0.0.0")){$_}}) | Group-Object).name) | % {$_,[System.Net.Dns]::GetHostbyAddress($_).HostName} |