12-31-2022 12:41 AM - edited 01-01-2023 08:21 PM
I have been trying to display current IPv6 connections with the GetExtendedTcpTable() method from Windows, but I'm not getting it to display any IPv6 Addresses. I only found code on how to display current IPv4 connections, so what I did is change the IPv4 methods to IPv6 methods of the Windows documentation. Any help it will be appreciated. Thanks in advance!
12-31-2022 01:46 AM
if the connection is established using ipv6 then TCP connection should show :
Get-NetTCPConnection -State Established | Format-Table -AutoSize
01-01-2023 09:00 PM
Hi @Timothysaunders ,
According to documentation, you need to call GetExtendedTcpTable() with ulAf set to AF_INET6.
https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getextendedtcptable
Regards,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide