Imports System
Imports System.Management
Module Module1
Sub Main()
Dim scope As New ManagementScope("\\.\root\cimv2")
scope.Connect()
Dim objectQuery As New ObjectQuery("SELECT * FROM Win32_Processor")
Dim searcher As New ManagementObjectSearcher(scope, objectQuery)
Dim cpu As ManagementObject
For Each cpu In searcher.Get()
Console.WriteLine("Processor: " & cpu("Name"))
Console.WriteLine("Manufacturer: " & cpu("Manufacturer"))
Console.WriteLine("Clock frequency: " & cpu("MaxClockSpeed") & " MHz")
Console.WriteLine("NumberOfLogicalProcessors: " & cpu("NumberOfLogicalProcessors"))
Console.WriteLine("NumberOfCores: " & cpu("NumberOfCores"))
Console.WriteLine()
Next cpu
Console.WriteLine()
Console.WriteLine("Press any key to quit")
Console.ReadKey()
End Sub
End Module