Hi everyone.
Today i will show simple tutorial how to know the system information using vb.net console and wmi.
This is a very simple tutorial but for new it would be great to learn about wmi
I think that some knows about how wmi works but some i still think do not.
So first open visual basic project and choose new.
Name your application as you wish as you like.
Now go to properties and select add reference from reference choose system.management and click ok.
Now go back to your application and above public class enter Imports System.Management.
Now delete all code in it and put this code.
I have combinded all code into one as for easier

If you like my tutorial so rep.
Code:
Module Module1
Public Class MyWMIQuery
Public Overloads Shared Function Main() As Integer
Dim searcher As New ManagementObjectSearcher( _
"root\CIMV2", _
"SELECT * FROM Win32_BIOS")
For Each queryObj As ManagementObject In searcher.Get()
Console.WriteLine("-----------------------------------")
Console.WriteLine("Win32_BIOS instance")
Console.WriteLine("-----------------------------------")
If queryObj("BIOSVersion") Is Nothing Then
Console.WriteLine("BIOSVersion: {0}", queryObj("BIOSVersion"))
Else
Dim arrBIOSVersion As String()
arrBIOSVersion = queryObj("BIOSVersion")
For Each arrValue As String In arrBIOSVersion
Console.WriteLine("BIOSVersion: {0}", arrValue)
Next
End If
Console.WriteLine("Manufacturer: {0}", queryObj("Manufacturer"))
Console.WriteLine("Name: {0}", queryObj("Name"))
Console.WriteLine("SMBIOSBIOSVersion: {0}", queryObj("SMBIOSBIOSVersion"))
Console.WriteLine("Status: {0}", queryObj("Status"))
Console.ReadLine()
Next
'kitas
Dim query As New ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = 'TRUE'")
Dim queryCollection As ManagementObjectCollection = query.[Get]()
For Each mo As ManagementObject In queryCollection
Dim addresses As String() = DirectCast(mo("IPAddress"), String())
Dim subnets As String() = DirectCast(mo("IPSubnet"), String())
Dim defaultgateways As String() = DirectCast(mo("DefaultIPGateway"), String())
Console.WriteLine("Network Card: {0}", mo("Description"))
Console.WriteLine(" MAC Address: {0}", mo("MACAddress"))
Console.ReadLine()
For Each ipaddress As String In addresses
Console.WriteLine(" IP Address: {0}", ipaddress)
Next
For Each subnet As String In subnets
Console.WriteLine(" Subnet Mask: {0}", subnet)
Console.ReadLine()
Next
For Each defaultgateway As String In defaultgateways
Console.WriteLine(" Gateway: {0}", defaultgateway)
Console.ReadLine()
Next
Next
'kitas
Dim query1 As New ManagementObjectSearcher("SELECT * FROM Win32_Operatin****tem")
Dim queryCollection1 As ManagementObjectCollection = query1.[Get]()
For Each mo As ManagementObject In queryCollection1
Console.WriteLine("Name : " + mo("name").ToString())
Console.WriteLine("Version : " + mo("version").ToString())
Console.WriteLine("Manufacturer : " + mo("Manufacturer").ToString())
Console.WriteLine("Computer Name : " + mo("csname").ToString())
Console.ReadLine()
Next
'kitas
query1 = New ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystem")
queryCollection1 = query1.[Get]()
For Each mo As ManagementObject In queryCollection1
Console.WriteLine("Manufacturer : " + mo("manufacturer").ToString())
Console.WriteLine("Model : " + mo("model").ToString())
Console.WriteLine(mo("systemtype").ToString())
Console.ReadLine()
Next
End Function
End Class
End Module