2,892 questions
See if this is what you are looking for
Dim hostName As String = Net.Dns.GetHostName()
Dim IPAddress As String = Net.Dns.GetHostByName(hostName).AddressList(0).ToString()
MessageBox.Show($"Host Name: { hostName} IP: {IPAddress}")
You can validate this with a PowerShell one-liner
Get-NetIPAddress -AddressFamily IPv4 | select IPaddress,Interface* | ConvertTo-Json