BRONZE PARTNER:
BRONZE PARTNER:
Industry News:

| |
| |
 |
 |
 |
 |
 |
| Monitor Serial Number Retrieval for SMS 2003 |
 |
|
|
By: Rod Kruetzfeld
Posted On: 4/1/2005
The purpose of this process is to document the step by step procedure required to extend the Microsoft SMS 2003 architecture to include serial number information to be attained by the SMS 2003 Hardware Inventory agent. SMS 2003 does not include this functionality by default, nor is it available through conventional means of SMS_DEF.mof extensions. Additional efforts must be made to attain this information from the registry, perform string conversions and insert this information into the WMI repository.
Technical Overview Monitor Serial Number VBS The purpose of the monitor serial number script (monsernum.vbs) is to provide the retrieval of the monitor EDID data and it’s conversion to a readable format. This script also checks for the existence of the WMI classes required to store the processed monitor inventory information. If they do not exist on the client system, they are created. Once these classes are created, instances are generated for each class and the current monitor information is inserted into the WMI repository.
SMS_DEF.mof Customization By adding the Monitors section to the current SMS_DEF.mof, the SMS Hardware Inventory agent is able to parse the correct location in WMI to retrieve the newly added monitor information. The SMS_DEF.mof must be compiled both on the clients and on the SMS Site servers. A copy of the updated MOF is stored at the site server for legacy clients. Compilation of the SMS_DEF.mof is required at the client to allow the creation of a HINV template in WMI used solely by SMS. By compiling the MOF at the server location, the HINV policy is updated to allow the flow of new hardware inventory information to be routed to the SMS database.
Initial Integration Processes Server 1. Open Windows explorer the following location: x:\SMS\inboxes\clifiles.src\hinv. 2. Open the SMS_DEF.mof file for editing using Notepad. 3. Move to the bottom of the file, add the following text to the file:
//---------------------- // Monitor Inventory //----------------------
#pragma namespace("\\\\.\\root\\cimv2\\SMS") [SMS_Report(TRUE), SMS_Group_Name("Monitors"), SMS_Class_ID("MICROSOFT|Monitors|1.0")]
class Monitors : SMS_Class_Template { [SMS_Report(TRUE), Key] string Manufactured_Month;
[SMS_Report(TRUE), Key] string Manufactured_Year;
[SMS_Report(TRUE), Key] string ManufacturerId;
[SMS_Report(TRUE), Key] string ModelName;
[SMS_Report(TRUE), Key] string ModelNameDesc;
[SMS_Report(TRUE), Key] string SerialNumber;
[SMS_Report(TRUE), Key] string Status;
[SMS_Report(TRUE), Key] string Unit;
};
4. Open a command prompt. Change the directory to x:\SMS\inboxes\clifiles.src\hinv 5. Type the following command: mofcomp.exe sms_def.mof The following text should be returned on the screen, indicating success.
Microsoft (R) 32-bit MOF Compiler Version 1.50.1085.0007 Copyright (c) Microsoft Corp. 1997-1999. All rights reserved.
Parsing MOF file: sms_def.mof MOF file has been successfully parsed Storing data in the repository... Done!
6. Within a few minutes, the SMS policy evaluator should take note of the new addition and create a new policy for clients to retrieve on their next policy refresh cycle.
Client 1. Create a new SMS package containing the SMS_Def.mof from the server location, F:\SMS\inboxes\clifiles.src\hinv. 2. Create a new program for this package, that will execute the following command line: MOFCOMP.exe SMS_Def.mof a. Ensure the program runs hidden b. Ensure the program is executed with Administrator privileges. 3. Insert into the same package, the monsernum.vbs file. 4. Create a new program for the vbs, use a command line of cscript.exe monsernum.vbs a. Ensure the program runs hidden b. Ensure the program is executed with Administrator privileges. 5. Create an advertisement that will execute the program from step 2 above, once for every SMS client. Ongoing Inventory Tasks Client 1. Create an advertisement that will executed on a monthly basis for the VBS program created in step 3, Initial Integration Processes – Client above.
General 1. Periodically test and review the operation of the serial number inventory by changing monitors and checking the results in the associated client’s inventory. 2. Note that a hardware inventory cycle must take place; after the monsernnum.vbs script is executed on the client. Currently the hardware cycle operates once each week on a simple schedule. 3. The monsernum.vbs must be periodically executed on each client to update the monitor information kept in the WMI repository. This will ensure the SMS inventory keeps current.
Acknowledgements Thanks to Paul Thomsen and Michael Mott for supplying the VBS portion of this project.
Files Click here 10550Monitor Serial Number.zip to download the associated vbs and mof addition in a zip file.
|
 |
 |
 |
|
|