The following command will return the serial number of the VM specified.
1 |
Get-WmiObject -ComputerName Computer-Namespace root\virtualization\v2 -class Msvm_VirtualSystemSettingData | where {$_.elementname -eq "VMName"} | select elementname, BIOSSerialNumber |