To get the Motherboard Serial in C# and VB.NET you can use the following snippet.
Sample C#
var managementObjectSearcher = new ManagementObjectSearcher("Select * From Win32_BaseBoard"); foreach (var managementObject in managementObjectSearcher.Get()) { Console.WriteLine(managementObject["SerialNumber"].ToString()); }
Sample VB.NET
Dim managementObjectSearcher = New ManagementObjectSearcher("Select * From Win32_BaseBoard") For Each managementObject As var In managementObjectSearcher.Get() Console.WriteLine(managementObject("SerialNumber").ToString()) Next
some mainboard manufacturers do not add this information, you will then geht something like
Not Applicable
RT @CodeSnippetsNET: How to get the Motherboard Serial in .NET http://t.co/ZYB3myxsQl #csharp #vb #dotnet #programming