Thanks for the information. From my knowledge, the serial number is related to bios. We could only get it from OS level. You could run PowerShell command from Azure Portal to get the serial number as long as the agent is ready.
- Check whether agent is ready or not.
2. Run command on Portal
3. Get the serial number