Create a text file with the following:

ComputerName = InputBox(Computer Name)strComputer = ComputerNameSet objWMIService = GetObject(winmgmts: _& {impersonationLevel=impersonate}!\\ & strComputer & \root\cimv2)Set colSMBIOS = objWMIService.ExecQuery _(Select * from Win32_SystemEnclosure)For Each objSMBIOS in colSMBIOSWscript.Echo Service Tag:  & objSMBIOS.SerialNumberNext```
Save it as a vbs then run:

cscript filename.vbs

You will need to run the script with the correct permissons to WMI.