Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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 = &h20arrComputers = 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

![]() |
WInnt4 domain v Win2k AD ...
|
mouse help
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |