Get Service tag

This script retrives the service tag of any mentioned computer and copies the same to your local clipboard

Source Code

This script has not been checked by Spiceworks. Please understand the risks before using it.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

' ********************************************************************************************' Get the Serial number/ Service Tag of the system and Copies the result to Clipboard' ********************************************************************************************strComputer=InputBox("Enter the Computer name to get its Inventory:-")SetobjWMIService=GetObject("winmgmts:"&"{impersonationLevel = impersonate}!\\"&strComputer&"\root\cimv2")SetobjIE=CreateObject("InternetExplorer.Application")SetcolSMBIOS=objWMIService.ExecQuery("Select * from Win32_SystemEnclosure")ForEachobjSMBIOSincolSMBIOSstrServiceTag=objSMBIOS.SerialNumberWScript.echo"SERVICE TAG: "&objSMBIOS.SerialNumber&VBCRLFNext' Copy Text to the ClipboardobjIE.Navigate("about:blank")objIE.document.parentwindow.clipboardData.SetData"text",strServiceTagobjIE.Quit