You can use WMI and the classes in the System.Management namespace to get the
Win32_SystemEnclosure[
^] class to get the serial number, IF AND ONLY IF the machine exposes it to WMI. You can find an example of querying WMI
here[
^].
There is no other "standard" interface to do so and no requirement anywhere that the serial number be exposed at all.