Results 1 to 39 of 39

Thread: Dell Service Tag

Hybrid View

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2003
    Posts
    42

    Dell Service Tag

    Hey guys this might be a weird question but....

    Does anyone know if there is a way to write a program and pull the service tag information from the bios off Dell Computers.

    Cause I just found out that dell is replacing all the hard drives from a whole bunch of machines that we got from them which particular service tags. Now I have access to those machine via VPN but I don't know how I can write a program that with run through a whole subnet of ip's for example

    192.168.1.0 - 192.168.1.254 and display the service tag for all the ip's it scanned through..

    If anyone has any idea comments/suggestion they are more than welcommed.


    Thanks
    ScarEye

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Dell Service Tag

    I can't say if its possible to get the service tag info via VB (i would guess the answer is NO, but I could be wrong)

    what I can say is there IS in fact a way to do it via code, there is no way you could do it without running the code on the machine itself... for example you couldn't just run an app from one computer that can check the bios of another computer simply by its IP...

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Dell Service Tag

    Last month I watched a DELL service guy (actually independent tech) replace the mother board on a laptop at one of my customer sites...

    When he was done he then popped a CD into the machine and not only displayed the service tag but also changed it to match the old motherboard.

    If DELL is doing this to you - maybe you can ask them for a program to display the service tag.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4

    Thread Starter
    Member
    Join Date
    Jun 2003
    Posts
    42

    Re: Dell Service Tag

    okay after doing some research I found using Windows Managment Instrumentation can show me the the serial number that is stored in the bios. Now there has to be a way I can connect to my remote machine WMI and pull this info.

    Does this information help any ?

    The Win32_BIOS WMI class represents the attributes of the computer system's basic input/output services (BIOS) that are installed on the computer.. But I think this applies to VB5 & VB6 =(
    there has to be something for .net also.


    kleinma, thanks for your reply. But what do you think about the information I posted above ?

    szlamany, I called up Dell and the tech that I spoke to said it can't be done. And I say YES it can. Also the software that your are talking about where I can change the information inside the BIOS to refelect another motherboard I have that and you can probably download it. It's called Dell Portable Asset Tag Utility.

    Any more thoughts ???


    Thanks
    ScarEye

  5. #5
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Dell Service Tag

    Quote Originally Posted by ScarEye
    szlamany, I called up Dell and the tech that I spoke to said it can't be done. And I say YES it can. Also the software that your are talking about where I can change the information inside the BIOS to refelect another motherboard I have that and you can probably download it. It's called Dell Portable Asset Tag Utility.
    The fact that the Dell Portable Asset Tag Utility can show and change the value proved the Dell tech wrong!

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Dell Service Tag

    Quote Originally Posted by ScarEye
    okay after doing some research I found using Windows Managment Instrumentation can show me the the serial number that is stored in the bios. Now there has to be a way I can connect to my remote machine WMI and pull this info.

    Does this information help any ?

    The Win32_BIOS WMI class represents the attributes of the computer system's basic input/output services (BIOS) that are installed on the computer.. But I think this applies to VB5 & VB6 =(
    there has to be something for .net also.


    kleinma, thanks for your reply. But what do you think about the information I posted above ?

    szlamany, I called up Dell and the tech that I spoke to said it can't be done. And I say YES it can. Also the software that your are talking about where I can change the information inside the BIOS to refelect another motherboard I have that and you can probably download it. It's called Dell Portable Asset Tag Utility.

    Any more thoughts ???


    Thanks
    ScarEye

    I think you would still need a "client" app running on each machine in order for you to connect to these machines via IP to get ANY information from them out of the BIOS... there just isn't a way you can take an IP, and using that IP obtain BIOS information from the remote computer, WMI doesn't have any "remote" capabilities like what you describe

  7. #7

    Thread Starter
    Member
    Join Date
    Jun 2003
    Posts
    42

    Re: Dell Service Tag

    kleinma,

    I am just doing some research and I did find this. Tell me what you
    think. I am still a n00b so that's why I am asking for everyones help


    http://msdn.microsoft.com/library/de...e_computer.asp



    Thanks

  8. #8
    Addicted Member Porsche944's Avatar
    Join Date
    Apr 2005
    Location
    Ann Arbor
    Posts
    182

    Re: Dell Service Tag

    At work here I had to do the same thing. The problem is that WMI doesen't let you use IP address like this. Somehow your going to have to turn that IP address into a NetBios name that you can use WMI with. Once you have that the rest is easy.

  9. #9

    Thread Starter
    Member
    Join Date
    Jun 2003
    Posts
    42

    Re: Dell Service Tag

    Quote Originally Posted by Porsche944
    At work here I had to do the same thing. The problem is that WMI doesen't let you use IP address like this. Somehow your going to have to turn that IP address into a NetBios name that you can use WMI with. Once you have that the rest is easy.



    You are wrong my friend. I don't know why you would say WMI does not let you use and IP address and that we have to use Netbios, I have ran this script on 400 computers over a vpn throughout the 5 borough's of New York and this has worked PERFECTLY. Using strictly IP address.
    Last edited by ScarEye; May 5th, 2005 at 12:45 PM.

  10. #10
    New Member
    Join Date
    May 2005
    Posts
    1

    Post Re: Dell Service Tag

    "P.S. this does scan through a whole subnet or anything just single IP. I know of a way to have a iplist.txt file and put all your private ip's in that list and it will just go through every single one of them and just do a loop. If you need that just reply to this thread. Hopefully I am still alive by then."

    Can you post that for me please? (To make the iplist.txt and make your program go thru that list)
    Thank you

  11. #11
    New Member
    Join Date
    Jun 2006
    Posts
    6

    Re: Dell Service Tag

    Hey, for what it's worth, we did get this working at my work - we have a vb script that we run on our server, it connects to each PC and collects a variety of information - including the dell service tag number - and puts it all into an xml form (or csv file? I can't remember).

    Anyway, if you still need it, I can see about pulling the required info from our vbscript and post it on here.

  12. #12
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Dell Service Tag

    i sure hope they aren't still looking for a solution a year later

  13. #13
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Dell Service Tag

    Either way, it still beats Dell's turnaround time for service. :X

  14. #14
    New Member
    Join Date
    Jun 2006
    Posts
    6

    Re: Dell Service Tag

    Haha... I didn't even notice the date on it! My mistake

    You're right though, Dell does take forever to respond.

  15. #15
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Dell Service Tag

    Quote Originally Posted by b_girl
    Haha... I didn't even notice the date on it! My mistake

    You're right though, Dell does take forever to respond.
    its ok.. it's not the biggest gap in responses.. i have seen 3-4 years

  16. #16
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Dell Service Tag

    For what it's worth...

    My DELL experiences have been great...

    LCD monitor over a year outside of warranty - but had a black-line traveling from top to bottom - they replaced it anyway...

    SERVER started to die - seemed like network card issues - ended up being an attack on the OS from a hacker - DELL support helped figure that out with us so we could nuke the machine and re-install...

    Just thought I would mention that

    Gateway, 6 years ago, would put me on hold - and then after 5 minutes come back on and say (electronically!) "there was no one able to help me in a reasonable amount of time" and then hang up on me - but they aren't really around anymore - are they?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  17. #17
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Dell Service Tag

    just another reason why I build my own PCs

  18. #18
    New Member
    Join Date
    Jun 2006
    Posts
    6

    Re: Dell Service Tag

    Dell is usually alright I guess, but we've had quite a few disasters with them in the past. They came to replace a fan in one of our servers once, and the muppet they sent ended up wiping all the data out! Thankfully we had a full backup of everything... After that day, we always made sure one of our engineers was on site whenever a Dell engineer would show up. *sigh*

  19. #19
    New Member
    Join Date
    Jun 2006
    Posts
    2

    Re: Dell Service Tag

    found these forums through Google and joined right away. Hey b_girl if I could get you to post your working service tag code that would be great.

  20. #20
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Dell Service Tag

    Headin, you could even try to send her a private message.

  21. #21
    New Member
    Join Date
    Jun 2006
    Posts
    2

    Re: Dell Service Tag

    ya, just found those features, thanks

  22. #22
    New Member
    Join Date
    Jun 2006
    Posts
    6

    Re: Dell Service Tag

    The code below is done in VB Script... It'll pull out the Service Tag and display it in a pop up window. Hope that helps.

    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

  23. #23
    Hyperactive Member
    Join Date
    Sep 2005
    Location
    Alaska
    Posts
    435

    Re: Dell Service Tag

    If you had LANDesk, you could do it.

  24. #24
    Junior Member
    Join Date
    Jul 2006
    Posts
    27

    Re: Dell Service Tag

    Can anyone translate that to VB.net instead of VB script...sorry I am just not clear enough on WMI to get the translation down. (just need to pull service tag from local system)

  25. #25
    New Member
    Join Date
    Jun 2006
    Posts
    6

    Re: Dell Service Tag

    Hey, I'm actually new to VB.Net and VB so I'm afraid I won't be much help with 'translating' from VB script.

    Sorry...

  26. #26
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    297

    Re: Dell Service Tag

    Assuming:
    you have added a reference to System.Management
    you have the line
    VB Code:
    1. Imports System.Management
    at the top of the code file, then this function will get the local machines tag:
    VB Code:
    1. Private Function GetMyTag() As String
    2.         Dim query As New SelectQuery("Win32_BIOS")
    3.         Dim searcher As New ManagementObjectSearcher(query)
    4.         Dim results As ManagementObjectCollection = searcher.Get
    5.         Dim enumerator As ManagementObjectCollection.ManagementObjectEnumerator = results.GetEnumerator
    6.         enumerator.MoveNext()
    7.         Dim properties As ManagementObject = enumerator.Current
    8.         Dim dellTag As String = properties("SerialNumber").ToString
    9.         searcher.Dispose()
    10.         results.Dispose()
    11.         enumerator.Dispose()
    12.         properties.Dispose()
    13.         Return dellTag
    14.     End Function

    I can't test this next function, for retrieving remote compter info. I get Access Denied errors with my home workgroup based network. It should be fine if you have a domain network and use a suitable user account. More on connecting here:
    msdn: connecting to wmi on a remote computer

    VB Code:
    1. Function GetDellTag(ByVal remotePath As String) As String
    2.         Dim co As New ConnectionOptions
    3.         co.Username = "Username"
    4.         co.Password = "Password"
    5.         ' e.g. remotePath = "\\Server1" or remotePath = "\\192.168.0.1"
    6.         Dim ms As New ManagementScope(remotePath & "\Root\cimv2", co)
    7.         Dim query As New System.Management.ObjectQuery("SELECT * FROM Win32_BIOS")
    8.         Dim searcher As New ManagementObjectSearcher(ms, query)
    9.         Dim results As ManagementObjectCollection = searcher.Get
    10.         Dim enumerator As ManagementObjectCollection.ManagementObjectEnumerator = results.GetEnumerator
    11.         enumerator.MoveNext()
    12.         Dim properties As ManagementObject = enumerator.Current
    13.         Dim dellTag As String = properties("SerialNumber").ToString
    14.         searcher.Dispose()
    15.         results.Dispose()
    16.         enumerator.Dispose()
    17.         properties.Dispose()
    18.         Return dellTag
    19.     End Function

  27. #27
    Junior Member
    Join Date
    Jul 2006
    Posts
    27

    Re: Dell Service Tag

    Thanks soooo much. Turns out the sloppy conversion I did from script to VB acually worked, just my test system did not have a service code in its bios.... next dell I went to worked like a charm.

  28. #28
    New Member
    Join Date
    Jul 2006
    Posts
    3

    Re: Dell Service Tag

    I have written a script that shows user name, computer ID, and Dell Service Tag. When I output the info using Wscript.echo it will output each of the three listed above in individual messageboxes. I change the code so it outputs to one message box but i cant get the output to go to a newline. It displays all on the same line. Here is my code.

    ' VBScript source code
    Option Explicit
    Dim objWshShell, colitems, objWMIservice, objitem, strUserName, strComputerName
    Set objWshShell = CreateObject("WScript.Shell")
    strUserName = objWshShell.ExpandEnvironmentStrings("%USERNAME%") ' Locates Username
    strComputerName = objWshShell.ExpandEnvironmentStrings("%COMPUTERNAME%") ' Locates Computer Name
    Set objWMIservice = GetObject("winmgmts:\\.\root\cimv2")
    set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
    For each objitem in colitems ' Locates Dell Service Tag
    Wscript.echo " User Name: " + strUserName & " Computer Name: " + strComputerName &_
    " Dell Service Tag: " & objitem.serialnumber ' Displays
    Next



    What is the code to make the output UserName ***** then have Computer name go to the Newline?

  29. #29
    New Member
    Join Date
    Aug 2006
    Posts
    1

    Re: Dell Service Tag

    'Connect to WMI namespace
    Dim objWshShell, colitems, objWMIservice, objitem, strUserName, strComputerName
    Set objWshShell = CreateObject("WScript.Shell")
    strUserName = objWshShell.ExpandEnvironmentStrings("%USERNAME%") ' Locates Username
    strComputerName = objWshShell.ExpandEnvironmentStrings("%COMPUTERNAME%") ' Locates Computer Name
    Set objWMIservice = GetObject("winmgmts:\\.\root\cimv2")
    set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
    For each objitem in colitems ' Locates Dell Service Tag
    'Output
    Wscript.echo " User Name: " & strUserName & vbcr _
    & " Computer Name: " & strComputerName & vbcr _
    & " Dell Service Tag: " & objitem.serialnumber
    Next





    that shoud do the trick for you

  30. #30
    New Member
    Join Date
    Mar 2008
    Posts
    1

    Smile Re: Dell Service Tag

    Here is a utility that I use within my network to get service tag and other info from my desktop. It will also let you know who is logged on to the machine if someone is logged on.

    Just copy the text below and paste into a notepad. then rename the file with .vbs extention. I would suggest running the script with elevated rights so that any active directory authentication or what not can be detoured. When you run the script just type in the computer name or IP address.

    enjoy.
    ---------copy from here down---------
    vb.net Code:
    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>"

  31. #31

    Thread Starter
    Member
    Join Date
    Jun 2003
    Posts
    42

    Re: Dell Service Tag

    Cool, thanks for the new script. =)

  32. #32
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Dell Service Tag

    The date span on this thread is amazing.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  33. #33
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Dell Service Tag

    I've seen much much worse... 5+ years sometimes...

  34. #34
    New Member
    Join Date
    Mar 2008
    Posts
    2

    Re: Dell Service Tag

    I've been using a little VB script that can pull the Service Tag from the pc's on the network when I know the computer name. This is what I have -

    strComputer = inputbox("Type the name of the computer with out \\ or an IP address to find out the service tag")

    if strComputer = "" then wscript.quit

    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure")
    For Each objSMBIOS in colSMBIOS
    Wscript.Echo "Service tag (serial number): " & objSMBIOS.SerialNumber
    Next




    Now I need one that can give me the computer name when I know the Service Tag. Can anyone help?
    Last edited by LPlater; Mar 24th, 2008 at 08:26 PM.

  35. #35
    New Member
    Join Date
    Mar 2008
    Posts
    2

    Re: Dell Service Tag

    Is there anyone out there than can help with the script above that I'm using and use any of the following code to locate the COMPUTER NAME on a network if I have the SERVICE TAG already?
    Can anyone put the two together to give me what I'm after.

    PLEEEASE!

    'Connect to WMI namespace
    Dim objWshShell, colitems, objWMIservice, objitem, strUserName, strComputerName
    Set objWshShell = CreateObject("WScript.Shell")
    strUserName = objWshShell.ExpandEnvironmentStrings("%USERNAME%") ' Locates Username
    strComputerName = objWshShell.ExpandEnvironmentStrings("%COMPUTERNAME%") ' Locates Computer Name
    Set objWMIservice = GetObject("winmgmts:\\.\root\cimv2")
    set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
    For each objitem in colitems ' Locates Dell Service Tag
    'Output
    Wscript.echo " User Name: " & strUserName & vbcr _
    & " Computer Name: " & strComputerName & vbcr _
    & " Dell Service Tag: " & objitem.serialnumber
    Next

  36. #36
    New Member
    Join Date
    Apr 2008
    Posts
    1

    Re: Dell Service Tag

    On Error Resume Next

    do while strcomputer = "" and a < 2
    strcomputer = Inputbox ("Please enter IP address or Computer name","Remote Computer Information Display","IP is preferred search method")
    strcomputer = trim(strcomputer)
    a = a + 1
    loop
    if not strComputer <> "" then
    wscript.echo "No computer name entered, ending script"
    wscript.quit
    end if

    On Error Resume Next
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
    if err.number <> 0 then
    if err.number = -2147217405 then
    wscript.echo "You do not have sufficient access rights to this computer"
    wscript.quit
    else
    wscript.echo "Could not locate computer" &vbcrlf& "Please check IP Address/Computer Name and try again"
    wscript.quit
    end if
    end if
    Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS")
    Set colItems1 = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
    Set colItems2 = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration Where IPEnabled = True")
    Set colitems3 = objWMIService.ExecQuery("SELECT * FROM Win32_computersystem")
    Set colitems4 = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkLoginProfile")
    Set colitems5 = objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDisk Where DriveType = 3")


    Set objExplorer = CreateObject("InternetExplorer.Application")
    objExplorer.Navigate "about:blank"
    objExplorer.ToolBar = 0
    objExplorer.StatusBar = 0
    objExplorer.Width = 800
    objExplorer.Height = 600
    objExplorer.Left = 100
    objExplorer.Top = 100
    objExplorer.Visible = 1

    Do While (objExplorer.Busy)
    Loop



    Set objDocument = objExplorer.Document
    objDocument.Open
    objDocument.Writeln "<html><head><title>Computer Information</title></head>"
    objDocument.Writeln "<body bgcolor='white'>"

    ' Computer Detals

    For Each objItem In colItems
    serial = objitem.serialnumber
    next
    For Each objItem In colItems1
    hostname = objitem.caption
    make = objitem.manufacturer
    model = objitem.model
    next

    objDocument.Writeln "<FONT color='red' size=4>Computer Information For: " & Ucase(hostname) & "</FONT><BR><BR>"
    objDocument.Writeln "<FONT face='Courier' color='black'>Serial : " & Serial & "</FONT><BR>"
    objDocument.Writeln "<FONT face='Courier' color='black'>Make : " & make & "</FONT><BR>"
    objDocument.Writeln "<FONT face='Courier' color='black'>Model : " & Model & "</FONT><BR>"

    For Each objItem In colItems5
    driveletter = objitem.name
    capacity = ((objitem.size / 1024) / 1024) / 1024
    free = ((objitem.FreeSpace / 1024) / 1024) / 1024
    free = FormatNumber (free,2)
    capacity = FormatNumber (capacity,2)


    objDocument.Writeln "<FONT face='Courier' color='black'>Capacity of " &driveletter& " - " & capacity & "GB</FONT><BR>"
    objDocument.Writeln "<FONT face='Courier' color='black'>Free Space on " &driveletter& " - " & Free & "GB</FONT><BR>"

    next

    objDocument.Writeln "<BR><FONT color='Blue' size=4>Please Wait, gathering more information...</FONT><BR><BR>"

    ' User Details

    For Each objItem In colItems3
    loggedon = objitem.username
    next
    For Each objItem In colItems4
    cachedlog = objitem.name
    username = objitem.FullName
    passwordexpire = objitem.passwordexpires
    badpassword = objitem.badpasswordcount
    if loggedon = cachedlog then
    objDocument.Writeln "<FONT color='red' size=4>User Information For...</FONT><BR>"
    objDocument.Writeln "<FONT color='red' size=4>" & username & "</FONT><BR><BR>"
    objDocument.Writeln "<FONT face='Courier' color='black'> User Name :" & loggedon &"</FONT><BR>"
    objDocument.Writeln "<FONT face='courier' color='black'> Incorrect Password Attempts : " & badpassword &"</FONT><BR>"
    on error resume next
    Set objaccount = GetObject("WinNT://scit84.sagchip.org/" &objitem.caption & ",user")
    if Err.Number <> 0 Then
    objDocument.Writeln "<FONT face='courier' color='black'>unable to retrieve password expiration information</FONT><BR>"
    Else
    If objAccount.PasswordExpired = 1 Then
    objDocument.Writeln "<FONT face='courier' color='red'>Password has Expired!</FONT><BR>"
    Else
    objDocument.Writeln "<FONT face='courier' color='black'>Password Expires " & objAccount.PasswordExpirationDate & " </FONT><BR><BR>"
    end if
    end if
    end if
    next

    ' Network Adapter Details

    For Each objItem In colItems2
    ipaddress = objitem.ipaddress(0)
    description = objitem.description
    DHCP = objitem.DHCPserver
    Domain = objitem.DNSdomain
    mac = objitem.MACaddress
    DNS = objitem.dnsserversearchorder(0)
    DNS1 = objitem.dnsserversearchorder(1)
    DNS2 = objitem.dnsserversearchorder(2)
    wins1 = objitem.winsprimaryserver
    wins2 = objitem.winssecondaryserver

    if not ipaddress = "0.0.0.0" then
    objDocument.Writeln "<FONT color='red' size=4>Network Adapter Details For...</FONT><BR>"
    objDocument.Writeln "<FONT color='red' size=4>" & description & "</FONT><BR><BR>"
    objDocument.Writeln "<FONT face='Courier' color='black'> IP Address :" & ipaddress &"</FONT><BR>"
    objDocument.Writeln "<FONT face='courier' color='black'> DHCP Server : " & DHCP &"</FONT><BR>"
    objDocument.Writeln "<FONT face='courier' color='black'> Domain Name : " & domain &"</FONT><BR>"
    objDocument.Writeln "<FONT face='courier' color='black'> MAC Address : " & mac &"</FONT><BR>"
    objDocument.Writeln "<FONT face='courier' color='black'> Primary DNS : " & DNS &"</FONT><BR>"
    objDocument.Writeln "<FONT face='courier' color='black'> Secondary DNS : " & DNS1 &"</FONT><BR>"
    objDocument.Writeln "<FONT face='courier' color='black'> Tertiary DNS : " & DNS2 &"</FONT><BR>"
    objDocument.Writeln "<FONT face='courier' color='black'> Primary WINS : " & wins1 &"</FONT><BR>"
    objDocument.Writeln "<FONT face='courier' color='black'> Secondary WINS : " & WINS2 &"</FONT><BR><BR>"
    end if
    next

    objDocument.Writeln "<FONT color='Blue' size=4>Script Finished</FONT><BR><BR>"

  37. #37
    New Member
    Join Date
    Jun 2008
    Posts
    1

    Re: Dell Service Tag

    ComputerName = InputBox("Machine Name To Query")

    winmgmt1 = "winmgmts:{impersonationLevel=impersonate}!//"& ComputerName &""
    Set SerialN = GetObject( winmgmt1 ).InstancesOf ("Win32_BIOS")

    For each Serial in SerialN
    MsgBox "Serial Number: " & Serial.SerialNumber
    Next

  38. #38
    New Member
    Join Date
    Jul 2008
    Posts
    1

    Cool Re: Dell Service Tag

    Thanks guys. I coded it in ruby, based on what you were saying in the thread.

    Made a "class" out of it.

    At the bottom is a example of "calling" the methods, to get the service tag.
    Now I'm going to wrap it in a Rails application to have a compete "pc" inventory application.

    http://mentalpagingspace.blogspot.co...number-in.html

Posting Permissions

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



Click Here to Expand Forum to Full Width