I'm using NETSTAT command in PowerShell. I need to grab the list of foreign addresses which starts with XYZ name and are ESTABLISHED as state using TCP connections.
I stuck up at parsing because of the NETSTAT result as below.
PS C:Windowssystem32> .NETSTAT.EXE
Active Connections
Proto Local Address Foreign Address State
TCP 10.125.4.233:2310 157.05.39.133:2492 ESTABLISHED
I need the foreign address names not the remote address on the local host only.
Remote address doesn't show the FQDN.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…