How to get your PC's serial number?

From the cmd prompt:

 wmic bios get serialnumber
 

As seen here.