+ Post New Thread
Results 1 to 8 of 8
Scripts Thread, Find Dell Service Tag in Coding and Web Development; Hi, Got a little VBS script here that will find the Dell service tag of your computer. Handy if you ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,374
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468

    Find Dell Service Tag

    Hi,

    Got a little VBS script here that will find the Dell service tag of your computer. Handy if you need it and you cant be bothered walking to the other end of the school.

    Z

    Code:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colSMBIOS = objWMIService.ExecQuery _
    ("Select * from Win32_SystemEnclosure")
    For Each objSMBIOS in colSMBIOS
    Wscript.Echo "Dell Service Tag: " & objSMBIOS.SerialNumber
    Next

  2. 5 Thanks to FN-GM:

    adhutton (9th June 2009), FatBoy (10th July 2009), JJonas (12th March 2009), linkazoid (2nd April 2009), mrtechsystems (12th March 2009)

  3. #2
    mrtechsystems's Avatar
    Join Date
    Jun 2005
    Location
    Yorkshire
    Posts
    425
    Thank Post
    106
    Thanked 22 Times in 22 Posts
    Rep Power
    26
    Might come in handy

    Cheers

  4. #3

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,820
    Thank Post
    883
    Thanked 685 Times in 454 Posts
    Rep Power
    505
    alternate method :

    Code:
    wmic bios get serialnumber
    or for a remote PC:

    Code:
    wmic /node:"remote-pc-name-here" bios get serialnumber

  5. Thanks to Gatt from:

    tech_guy (12th March 2009)

  6. #4

    SYSMAN_MK's Avatar
    Join Date
    Sep 2005
    Posts
    4,012
    Thank Post
    490
    Thanked 1,345 Times in 731 Posts
    Rep Power
    429
    Great for single machines. What would be even better would be a version that looked for machine name from a text file and the dumped the values to another text file along with the machince name.
    This would be great when installing new machines, no need to manually take down each service tag.

  7. #5

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    10,053
    Thank Post
    3,584
    Thanked 1,123 Times in 1,025 Posts
    Rep Power
    377
    I did the same as below but instead of using strComputer="." I replaced that with an input box to request for the computer name might be other ways of doing this but have not tried.

    Code:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colSMBIOS = objWMIService.ExecQuery _
    ("Select * from Win32_SystemEnclosure")
    For Each objSMBIOS in colSMBIOS
    Wscript.Echo "Dell Service Tag: " & objSMBIOS.SerialNumber
    Next
    code I used :

    Code:
    strComputer = InputBox("Please enter the computername or I.P Address")
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colSMBIOS = objWMIService.ExecQuery _
    ("Select * from Win32_SystemEnclosure")
    For Each objSMBIOS in colSMBIOS
    Wscript.Echo "Dell Service Tag: " & objSMBIOS.SerialNumber
    Next
    The machine has to at least be switched on and at the logon screen and if the machine in question has the ports blocked related to WMI and that sort of thing obviously it will fail. Generally windows firewall is switched off so should work if thats the case unless there are other things that could possibly / maybe stop or block the traffic ( VLAN ??? ) not sure.

  8. #6

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    10,053
    Thank Post
    3,584
    Thanked 1,123 Times in 1,025 Posts
    Rep Power
    377
    Quote Originally Posted by SYSMAN_MK View Post
    Great for single machines. What would be even better would be a version that looked for machine name from a text file and the dumped the values to another text file along with the machince name.
    This would be great when installing new machines, no need to manually take down each service tag.
    I did try and look into that when doing the above script but never got around to it due to time constraints - although I do know you can use arrays to store the computer names and do it that way and its easily enough written into another text file.

    Short of that you can use ADUC and retrieve the computer names from each OU and do it on a per OU basis ?

  9. #7


    tom_newton's Avatar
    Join Date
    Sep 2006
    Location
    Leeds
    Posts
    4,507
    Thank Post
    871
    Thanked 862 Times in 681 Posts
    Rep Power
    199
    FWIW, same thing can be achieved with dmidecode - there are windows binaries available, but usefully it is very cross-platform. ISTR it is now part of standard Smoothie build (I have been rolling my own for years) so you should be able to quiz most of your kit now

  10. #8

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,374
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    Quote Originally Posted by SYSMAN_MK View Post
    Great for single machines. What would be even better would be a version that looked for machine name from a text file and the dumped the values to another text file along with the machince name.
    This would be great when installing new machines, no need to manually take down each service tag.
    here we go

    Inventory Your network



SHARE:
+ Post New Thread

Similar Threads

  1. QR Codes and Microsoft Tag
    By Tamarside in forum Netbooks, PDA and Phones
    Replies: 2
    Last Post: 9th February 2009, 02:33 PM
  2. Tag Learning Big Bus
    By the_one_that_cant in forum Educational Software
    Replies: 1
    Last Post: 7th July 2008, 11:44 AM
  3. HTML tag help
    By randle in forum Web Development
    Replies: 5
    Last Post: 21st April 2008, 04:03 PM
  4. IMG Tag Signature
    By Jackd in forum Comments and Suggestions
    Replies: 6
    Last Post: 11th January 2008, 07:59 PM
  5. Popup or Alt Tag title
    By Scotmk in forum Web Development
    Replies: 3
    Last Post: 12th September 2007, 06:12 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •