Retrieve Monitor Serial Numbers in Ghost - By Adding WMI Elements and Using Inventory
I wanted to be able to gather the system serial numbers and the attached monitors serial numbers and then generate a report.
Serial numbers for the main computer was already in WMI (\\.\root\CIMV2\Win32_BIOS\SerialNumber) and I could already get that information.
I found a VBS utility that would add the monitor serial number to WMI ( I am not a VBS person so I can't offer support or enhancements to the VBS utility).
Then using the ghost console I can grab that from WMI and generate a report.
But I needed to add the new WMI to the Collected Data.
The detailed step-by-step guide should allow you to add your own custom WMI elements and be able to generate GSS 2.5 reports on them.
Needed: monsernum.vbs - attached below rename from monsernum.txt to monsernum.vbs
- Copy monsernum.vbs to c:\utils\.. On ghost console server
- Run monsernum.vbs on the ghost console server. This will add the WMI elements.
"C:\WINDOWS\system32\cscript.exe" c:\utils\monsernum.vbs
C:\Utils\Berning>"C:\WINDOWS\system32\cscript.exe" c:\utils\berning\monsernum.vbs Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. WMI Found, Processing Continues WMI Monitor key 1: DISPLAY\DEFAULT_MONITOR\5&2CA6D679&0&10000000&06&05 Processing Other Displays EDID not found Monitor manufactured in December of 1995 No monitor serial number found. Possibly the computer is a laptop. No monitor model name was found. Possibly the computer is a laptop. Monitor manufactured in December of 1999 Monitor serial number: HI94635224 Monitor model name: M70B Processing WMI Classes and Properties Creating Monitors Class for CimV2 Namespace added data class to CimV2 Namespace wrote the data to WMI Script Finished
- In the Ghost Console turn on the "Collected Data sets in the Inventory"
Tools --> Options --> Inventory tab
- In the Ghost Console expand to Inventory --> Collected Data --> Hardware and add a new Collected Data Set
- It will scan the WMI. Enter the following information:
- Click OK
- Click Ok
- Now we need to create an Inventory View. In the Ghost Console expand to Inventory --> View --> Hardware. Add a new Monitor View.
- Enter the following information:
- (optional) I like to have a single view that has the CPU serial numbers, Monitor serial numbers and Mac addresses, this way I can have all of this info on a single report.
- Now we need to setup a report to use that view (optionally you can filter the machines). Expand Inventory --> Report --> New Inventory Report
- Enter the following information (but you wont be able to run the report yet) then click ok.
- Need to run the VBS script on each client and retrieve the inventory information.
Set up a task that includes Software and File Actions and Refresh Inventory:Transfer: monsernum.vbs to the c:\utils directory
Execute: "C:\WINDOWS\system32\cscript.exe" c:\utils\monsernum.vbs
Refresh Inventory
- Execute the task (can run on all servers and classroom machines).
Wait for task to complete before going to step 15.
- Run the report. Expand to Inventory --> Report , right click on Serial Numbers (created in step 12) --> Run Report …
You can save it to a comma separated file.