locked
How to get the service tag from dell computers RRS feed

  • Question

  • I am trying to get the Service Tag from dell computers without having to go to the BIOS, it could be a DOS interface or a graphical one, I just looking for a little program that would allow me to get this information. Something like “msinfo32”.

    Thanks.

    Wednesday, May 20, 2009 3:04 PM

Answers

All replies

  • On a Dell machine, you can either pull it from the bottom, or go to the Dell Support site from the machine which can scan the computer, which leads me to believe it is within the registry or query-able. 
    Eric Irvin, MCP, MCSA, MCSE, MCITP:Enterprise Admin, CISSP http://www.diggingup.com
    • Marked as answer by Kevin Remde Sunday, May 23, 2010 1:38 PM
    Wednesday, May 20, 2009 3:46 PM
  • Try this vbscript. Just open a notepad, copy it in, and save it as whatever.vbs

    Set objWMIservice = GetObject("winmgmts:\\.\root\cimv2")
    set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
    For each objitem in colitems
    Wscript.echo "Dell Service Tag: " & objitem.serialnumber
    Next

    Or you could get crazy and do this:

    1. On Error Resume Next
    2.  
    3. do while strcomputer = "" and a < 2
    4.   strcomputer = Inputbox ("Please enter IP address or Computer name","Remote Computer Information Display","IP is preferred search method")
    5.   strcomputer = trim(strcomputer)
    6.   a = a + 1
    7. loop
    8. if not strComputer <> "" then
    9.  wscript.echo "No computer name entered, ending script"
    10.  wscript.quit
    11. end if
    12.  
    13. On Error Resume Next
    14. Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
    15. if err.number <> 0 then
    16.  if err.number = -2147217405 then
    17.   wscript.echo "You do not have sufficient access rights to this computer"
    18.   wscript.quit
    19.   else
    20.   wscript.echo "Could not locate computer" &vbcrlf& "Please check IP Address/Computer Name and try again"
    21.   wscript.quit
    22.  end if
    23. end if
    24. Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS")
    25. Set colItems1 = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
    26. Set colItems2 = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration Where IPEnabled = True")
    27. Set colitems3 = objWMIService.ExecQuery("SELECT * FROM Win32_computersystem")
    28. Set colitems4 = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkLoginProfile")
    29. Set colitems5 = objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDisk Where DriveType = 3")
    30.  
    31.  
    32. Set objExplorer = CreateObject("InternetExplorer.Application")
    33. objExplorer.Navigate "about:blank"
    34. objExplorer.ToolBar = 0
    35. objExplorer.StatusBar = 0
    36. objExplorer.Width = 800
    37. objExplorer.Height = 600
    38. objExplorer.Left = 100
    39. objExplorer.Top = 100
    40. objExplorer.Visible = 1
    41.  
    42. Do While (objExplorer.Busy)
    43. Loop
    44.  
    45.  
    46.  
    47. Set objDocument = objExplorer.Document
    48. objDocument.Open
    49. objDocument.Writeln "<html><head><title>Computer Information</title></head>"
    50. objDocument.Writeln "<body bgcolor='white'>"
    51.  
    52. ' Computer Detals
    53.  
    54. For Each objItem In colItems
    55.  serial = objitem.serialnumber
    56. next
    57. For Each objItem In colItems1
    58.  hostname = objitem.caption
    59.  make = objitem.manufacturer
    60.  model = objitem.model
    61. next
    62.  
    63. objDocument.Writeln "<FONT color='red' size=4>Computer Information For: " & Ucase(hostname) & "</FONT><BR><BR>"
    64. objDocument.Writeln "<FONT face='Courier' color='black'>Serial : " & Serial & "</FONT><BR>"
    65. objDocument.Writeln "<FONT face='Courier' color='black'>Make : " & make & "</FONT><BR>"
    66. objDocument.Writeln "<FONT face='Courier' color='black'>Model : " & Model & "</FONT><BR>"
    67.  
    68. For Each objItem In colItems5
    69.  driveletter = objitem.name
    70.  capacity = ((objitem.size / 1024) / 1024) / 1024
    71.  free = ((objitem.FreeSpace / 1024) / 1024) / 1024
    72.  free = FormatNumber (free,2)
    73.  capacity = FormatNumber (capacity,2)
    74.  
    75.  
    76. objDocument.Writeln "<FONT face='Courier' color='black'>Capacity of " &driveletter& " - " & capacity & "GB</FONT><BR>"
    77. objDocument.Writeln "<FONT face='Courier' color='black'>Free Space on " &driveletter& " - " & Free & "GB</FONT><BR>"
    78.  
    79. next
    80.  
    81. objDocument.Writeln "<BR><FONT color='Blue' size=4>Please Wait, gathering more information...</FONT><BR><BR>"
    82.  
    83. ' User Details
    84.  
    85. For Each objItem In colItems3
    86.  loggedon = objitem.username
    87. next
    88. For Each objItem In colItems4
    89.  cachedlog = objitem.name
    90.  username = objitem.FullName
    91.  passwordexpire = objitem.passwordexpires
    92.  badpassword = objitem.badpasswordcount
    93.  if loggedon = cachedlog then
    94.   objDocument.Writeln "<FONT color='red' size=4>User Information For...</FONT><BR>"
    95.   objDocument.Writeln "<FONT color='red' size=4>" & username & "</FONT><BR><BR>"
    96.   objDocument.Writeln "<FONT face='Courier' color='black'> User Name :" & loggedon &"</FONT><BR>"
    97.   objDocument.Writeln "<FONT face='courier' color='black'> Incorrect Password Attempts : " & badpassword &"</FONT><BR>"
    98.   on error resume next
    99.   Set objaccount = GetObject("WinNT://**********/" &objitem.caption & ",user")
    100.   if Err.Number <> 0 Then
    101.    objDocument.Writeln "<FONT face='courier' color='black'>unable to retrieve password expiration information</FONT><BR>"
    102.   Else
    103.    If objAccount.PasswordExpired = 1 Then
    104.     objDocument.Writeln "<FONT face='courier' color='red'>Password has Expired!</FONT><BR>"
    105.    Else
    106.     objDocument.Writeln "<FONT face='courier' color='black'>Password Expires " & objAccount.PasswordExpirationDate & " </FONT><BR><BR>"
    107.    end if
    108.   end if
    109.  end if
    110. next
    111.  
    112. ' Network Adapter Details
    113.  
    114. For Each objItem In colItems2
    115.  ipaddress = objitem.ipaddress(0)
    116.  description = objitem.description
    117.  DHCP = objitem.DHCPserver
    118.  Domain = objitem.DNSdomain
    119.  mac = objitem.MACaddress
    120.  DNS = objitem.dnsserversearchorder(0)
    121.  DNS1 = objitem.dnsserversearchorder(1)
    122.  DNS2 = objitem.dnsserversearchorder(2)
    123.  wins1 = objitem.winsprimaryserver
    124.  wins2 = objitem.winssecondaryserver
    125.  
    126.  if not ipaddress = "0.0.0.0" then
    127.   objDocument.Writeln "<FONT color='red' size=4>Network Adapter Details For...</FONT><BR>"
    128.   objDocument.Writeln "<FONT color='red' size=4>" & description & "</FONT><BR><BR>"
    129.   objDocument.Writeln "<FONT face='Courier' color='black'> IP Address :" & ipaddress &"</FONT><BR>"
    130.   objDocument.Writeln "<FONT face='courier' color='black'> DHCP Server : " & DHCP &"</FONT><BR>"
    131.   objDocument.Writeln "<FONT face='courier' color='black'> Domain Name : " & domain &"</FONT><BR>"
    132.   objDocument.Writeln "<FONT face='courier' color='black'> MAC Address : " & mac &"</FONT><BR>"
    133.   objDocument.Writeln "<FONT face='courier' color='black'> Primary DNS : " & DNS &"</FONT><BR>"
    134.   objDocument.Writeln "<FONT face='courier' color='black'> Secondary DNS : " & DNS1 &"</FONT><BR>"
    135.   objDocument.Writeln "<FONT face='courier' color='black'> Tertiary DNS : " & DNS2 &"</FONT><BR>"
    136.   objDocument.Writeln "<FONT face='courier' color='black'> Primary WINS : " & wins1 &"</FONT><BR>"
    137.   objDocument.Writeln "<FONT face='courier' color='black'> Secondary WINS : " & WINS2 &"</FONT><BR><BR>"
    138.  end if
    139. next
    140.  
    141. objDocument.Writeln "<FONT color='Blue' size=4>Script Finished</FONT><BR><BR>"


    Check out this page for more details: http://www.vbforums.com/showthread.php?t=326425

    Kyle Bubp
    • Proposed as answer by kbubp Thursday, May 21, 2009 3:12 PM
    Thursday, May 21, 2009 3:06 PM
  • Cool. 

    Okay.. you PowerShell experts.. let's see your version.  I bet this could be done in PowerShell in about 1/4 the code.  :)

    -Kevin
    Kevin Remde US IT Evangelism - Microsoft Corporation http://blogs.technet.com/kevinremde
    Friday, May 22, 2009 4:13 PM
  • Dell provides management of certain Dell workstations via their Open Manage Utilities...
    http://www.dell.com/content/topics/global.aspx/sitelets/solutions/management/client_overview?c=us&cs=555&l=en&s=biz

    Has management console and the such!

    • Marked as answer by Kevin Remde Sunday, May 23, 2010 1:38 PM
    Wednesday, May 27, 2009 5:47 PM
  • Cool. 

    Okay.. you PowerShell experts.. let's see your version.  I bet this could be done in PowerShell in about 1/4 the code.  :)

    -Kevin
    Kevin Remde US IT Evangelism - Microsoft Corporation http://blogs.technet.com/kevinremde
    Heh, it was only 5 lines...

    Although I would be interested in the PS version.
    Wednesday, June 3, 2009 8:34 PM
  • hey I'm a powershell newbie,  but I think its like this 

    Get-WmiObject win32_bios | format-list SerialNumber

    • Marked as answer by Kevin Remde Sunday, May 23, 2010 1:39 PM
    Monday, June 8, 2009 4:41 AM
  • Drop to a command prompt and enter this:

    wmic bios get serialnumber

    • Proposed as answer by Bemral Tuesday, April 22, 2014 6:15 PM
    Sunday, March 30, 2014 1:39 PM