Awesome.... Another option using VB Script... Save the below code to a VBS File:
on error resume next
strComputer=WScript.Arguments.Item(0)
Set objWMIservice = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
For each objitem in colitems
Wscript.echo "Dell Service Tag: " & objitem.serialnumber
Next
'
Run the file like this:
cscript C:\folder\script.vbs MyComputerName
And it will return the value of a remote PC too. Very useful if you are making calls about PC's other than your own on the network.