Get All IP Addresses For a Machine

Category:
C#, VB.NET, ASP.NET
Type:
Snippets
Difficulty:
Intermediate
Author:
Anonymous

Version Compatibility: Visual Basic.NET

More information:
This method does not use the hostname and DNS lookup utilities. It uses the WMI to check each NIC and return all IP addresses in an array.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: