Computing.Net > Forums > Windows NT > Inventory computer s/n

Inventory computer s/n

Reply to Message Icon

Original Message
Name: squib
Date: May 6, 2005 at 11:56:27 Pacific
Subject: Inventory computer s/n
OS: NT 4.0 workstation
CPU/Ram: 866/128
Comment:

Im trying to get computer serial numbers from about 200 NT 4.0 workstations but cant seem to get my script to run against the NT boxes...it works fine running it against the XP stations we have....does anyone have a script that would do this?

squib


Report Offensive Message For Removal


Response Number 1
Name: Steve Dunn
Date: May 6, 2005 at 15:12:56 Pacific
Subject: Inventory computer s/n
Reply: (edit)

what do you mean by serial number?


Report Offensive Follow Up For Removal

Response Number 2
Name: squib
Date: May 6, 2005 at 15:45:42 Pacific
Subject: Inventory computer s/n
Reply: (edit)

Hi Steve,

I mean the computer serial number from the manufacturer....you can get it with WMI (IdentifyingNumber)...on an XP machine but it doesnt work on an NT box...same computer/manufacturer..

On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

arrComputers = Array("Computer_Name_Here")
For Each strComputer In arrComputers
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each objItem In colItems
WScript.Echo "Caption: " &
WScript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber


Report Offensive Follow Up For Removal

Response Number 3
Name: Dirty_Sanchez
Date: May 28, 2005 at 17:15:51 Pacific
Subject: Inventory computer s/n
Reply: (edit)

there are quite a few third party programs that can do this for you like asset tracker.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Inventory computer s/n

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software