Every now and then, I’ll need to pull the Service Tag from a Dell system that I’m working on remotely.
From cmd line this can be done with:
wmic bios get serialnumber
However, if you want to do something with the output, Powershell is a bit better:
If you’re wanting to only return the value without the column: