🟣 C# / .NET 6+
Get Motherboard Info Report (C#)
Queries Win32_BaseBoard via WMI (System.Management) and prints Motherboard Info to the console.
GetBaseBoardReport.cs
// GetBaseBoardReport.cs
//
// Reports Motherboard Info via WMI (Win32_BaseBoard).
//
// Requires the System.Management package:
// dotnet new console -o BaseBoardReport
// dotnet add package System.Management
// (replace the generated Program.cs with this file, then dotnet run)
// On .NET Framework, System.Management is already available — just
// add a reference to it in your project.
using System;
using System.Management;
var searcher = new ManagementObjectSearcher("SELECT Manufacturer, Product, SerialNumber FROM Win32_BaseBoard");
int count = 0;
foreach (ManagementObject item in searcher.Get())
{
Console.WriteLine($"Manufacturer: {item["Manufacturer"]}");
Console.WriteLine($"Product: {item["Product"]}");
Console.WriteLine($"SerialNumber: {item["SerialNumber"]}");
Console.WriteLine(new string('-', 40));
count++;
}
if (count == 0)
{
Console.WriteLine("No Motherboard Info found.");
}
else
{
Console.WriteLine($"\n{count} Motherboard Info found.");
}