Popular Post FN-GM Posted March 12, 2009 Popular Post Posted March 12, 2009 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 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 5
Gatt Posted March 12, 2009 Posted March 12, 2009 alternate method : wmic bios get serialnumber or for a remote PC: wmic /node:"remote-pc-name-here" bios get serialnumber 1
mac_shinobi Posted March 12, 2009 Posted March 12, 2009 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. 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 : 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.
mac_shinobi Posted March 12, 2009 Posted March 12, 2009 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 ?
tom_newton Posted March 12, 2009 Posted March 12, 2009 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
FN-GM Posted March 12, 2009 Author Posted March 12, 2009 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 http://www.edugeek.net/forums/scripts/32287-inventory-your-network.html#post303555
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now