SMS General Inventory

Goto the SMS Home Page

This page details general problems and issues relating to Inventory.

Can I get a Print out of a Computer's Hardware and Software Inventory?

See the Can I extract SMS query data into other programs? on the Query Related page for further information on achieving this.

Using version 1.2 of the MMC (details of which you can find on the MMC page), you can right-click and export the results of Queries and the contents of Collections to text files which then be imported and manipulated in other applications.

On page 421 of the SMS Resource Kit it talks about using Access 97 to query the SMS database.  Ken Lutz used Access 2000 instead. He also linked the SMS tables and then used this query:

SELECT dbo_PC_User_Information_DATA.MachineID, dbo_PC_User_Information_DATA.Last_Name00, dbo_PC_User_Information_DATA.First_Name00, dbo_PC_User_Information_DATA.Department00, dbo_PC_User_Information_DATA.Building00, dbo_PC_User_Information_DATA.Floor00, dbo_PC_User_Information_DATA.PC_Type00, dbo_PC_User_Information_DATA.PC_Serial_Number00, dbo_PC_User_Information_DATA.Fixed_Asset_Number00, dbo_PC_User_Information_DATA.Phone_number00, dbo_PC_Memory_DATA.TotalPhysicalMemory0, dbo_Operating_System_DATA.Caption0, dbo_Operating_System_DATA.CSDVersion0, dbo_System_DATA.Name0 FROM ((dbo_PC_User_Information_DATA INNER JOIN dbo_PC_Memory_DATA ON dbo_PC_User_Information_DATA.MachineID = dbo_PC_Memory_DATA.MachineID) INNER JOIN dbo_Operating_System_DATA ON dbo_PC_User_Information_DATA.MachineID = dbo_Operating_System_DATA.MachineID) INNER JOIN dbo_System_DATA ON dbo_PC_User_Information_DATA.MachineID = dbo_System_DATA.MachineID WHERE (((dbo_PC_User_Information_DATA.Department00) Like "*print*")) ORDER BY dbo_PC_User_Information_DATA.Department00;

for the basis of the report, Ken also used sub-reports to report on the hardware classes (like sound cards) that not all PCs have. The end result was a complete report of all the hardware for any given PC.

Note: Ken has a custom MIF (PC_User_Information) that has department information in it, and he used that to group his machines together.
 

Can I Inventory Files without Collecting them?

Is it possible to inventory specific files, without collecting them? We need to keep track of whether our users have the up to date McAffee data files - 'clean.dat' etc.

We don't want to inventory all '
*.dat' files as there might be loads of them that are irrelevant. We don't  want to collect 'clean.dat' etc., because they are huge and will generate a lot of traffic.

All we want to do is add several complete file names to the Software Inventory process - rather than searching for a specific extension, such as EXE, DLL, etc.

See the chapter in the SMS Resource Guide about Hardware Inventory and MIFs.  You could write a script of some sort (probably even just a simple batch file), that checks for the existence of the file in question and then writes a MIF. SMS collects the MIF and it gets reported in the resource explorer, etc. That's quick, easy, and low overhead.

The SMS SDK also talks about hardware inventory extensions, though maybe a little cryptically. It's at:

http://support.microsoft.com/support/smsmgmt/content/sms20sdk.asp

I like extending SMS hardware inventory using WMI, as per this seminar:

http://www.microsoft.com/seminar/shared/asp/view.asp?url=/seminar/en/20000822smshwarept1/manifest.xml

But that might be overkill in this case.
 

CPU Utilisation Goes to 100% During Inventory on NT 4 Workstations

Contributed By: Doug Robertson
If you’re seeing a problem where your CPU utilisation goes to 100% during inventory then this information should help…
 [Go to article]
 

Delete Aged Inventory Task Not Working

We have had a problem with our SMS (SP1) folder growing in size. Specifically it is '\SMS\Inboxes\sinv.box'. We had File Collection set up.  Below this folder are five copies of three files for each client.

We have '
Delete Aged Inventory History' setup to run everyday and remove history older than 5 days. This is not reducing the size of the folder. What can I do to make this scheduled task work?

And, will simply deleting the files cause problems? Currently, Software Inventory is off, and we modified the server's Registry to keep only one copy of each collected file.

That isn't Inventory.  Those are collected files. Modify the 'Delete Aged Collected Files' task.

The recommendation from Microsoft is to use Query Analyzer to determine if there are references to these files in the SMS database, using the following command:

select * from collectedfiles

If you come up with no results it is safe to delete the files. We moved all of the folders underneath 'filecol', and SMS continued to function normally.  We then deleted these files.
 

"ERROR 4 - Get xx Inventory Sites data failed !!" error for both Hardware and Software Inventory

Contributed By: Rod Trent [MVP SMS]
If you're seeing this error in either or both of your Inventory log files then help is at hand...
 [Go to article]
 

EventID:529 every 4 seconds on a workstation

On a member server in my Resource domain, I am getting the following error about once every 4 seconds:

EventID:529
Computer:ICT0MS28
Logon Failure
Username:SMSCliToknAcct&
Reason:Unknown user name or bad password
Domain: KII-206329 (This is a workstation and not the name of our domain)
Logon Type:3
Workstation Name:\\KII-206391

We are running SMS 2.0 SP2. The server specified doesn't have any SMS client or server component on it. To me, it looks like the client token account on the workstation is trying to authenticate on another server ('ICT0MS28'). The funny thing is that we have no advertisements that use the 'Run As Administrator' box checked. So the CliTokn account shouldn't even be used. Is that right? Also, our NT admin guy said that the workstations that appear in 'Workstation Name' in the error above are workstations that usually use this server for file and print services.

The SMS Client Token Account is used during Hardware and Software inventory. If your client ('KII-206391') has the SMS 2.0 client installed, uses certain video drivers, and the path statement includes a network resource (e.g. a mapped drive), the inventory agent used to query the sound card/ driver may be looking for some audio files on the local PC.

If these files are not found, the driver will point the inventory agent to the path statement. Since the LOCAL SMS Client Token Account is being used for inventory, and it doesn't have domain rights anywhere, it will cause that error when it tries to interrogate the network drive that is in the path.

Add the following files to the local WinNT directory on the CLIENT PC

  • Open.wav
  • Close.wav

These do not need to be actual '.WAV' files - just text files with a '.WAV' extension. I know it sounds strange, but give it a try. We automated this through our login script by placing the bogus files in the 'netlogon' share and copying then locally at every login.
 

Has anyone created a MIF in SMS and Distributed it to Clients?

Get the 'MIFWIN.EXE' and the MIF form you created with the MIF GEN from the BORK 4.5 Resource Kit. Copy 'MIFWIN.EXE' and the '*.XNF' files to the users 'MS\SMS\CORE\BIN' directory. Open the '*.XNF' files using 'MIFWIN.EXE' and fill out the form and save it - it will go to the 'NOIDMIFS' directory by default.

Start the Hardware Inventory component on the client and SMS will see the '
NOIDMIFS' folder has a file in it. Under 'Resource Explorer
' for the client, your MIF name will appear with the data that you input to the fields.
 

How can I Inventory certain Registry Keys/Values?

How can I inventory certain Registry keys/values? The 'Win32_registry' action class looks useful but I wanted to see if anybody is currently doing this. I know there is the Computing Edge solution but I'm looking for something more integrated and simple.

Contributed By: Cliff Hobbs [MVP SMS]
1E did an article that explains how to do this. You can tell the Hardware Inventory agent to go and get the information you want using the WMI registry provider. I think there may also be a sample MOF with SP2 now. The document with an example is at:

http://www.1e.com/Downloads/Index.aspx

and its called 'Extend SMS Inventory'.
 

How to get Asset Information into Your SMS Database

Contributed By: Michael Mott
To properly get asset information into your SMS 2.0 database, your SMS clients need to meet the following criteria:
  1. Be using WMI 1.5
     
  2. The PC hardware must be SMSBIOS2 compliant, meaning your PC BIOS must be at this level.  A tool to check this can be found at http://www.ibm.com/products/surepath/other/smbios.html.  Look for the section named SMBIOS Version 2.3.1 (Build 40)
     
  3. Proper DCOM (for 9X systems only)

Windows 2000 has all this built in.  If your other operating systems don't report this after modifying your 'SMS_DEF.mof', then either the BIOS is not compliant or WMI 1.5 and/or DCOM is not on the system(s).

I have used this on all versions and Service Packs of NT 4.0, and all flavours of Windows 9.x, once I brought the BIOS up to date and applied the updated software.  If you have older systems with an older BIOS, even if they are Windows 2000 systems, you may not get the serial number into the database especially if a newer BIOS is not available.

Next you edit a COPY of your 'SMS_DEF.mof'.  Pull a copy of this from '\\server\share\SMS\inboxes\clifiles.src\hinv' and put it in a folder locally on your desktop or server.

Obtain/ use the newest version of '
MOFManager', 2.0.20, which comes with the
Systems Management Server 2.0 Service Pack Support Tools on Microsoft's SMS page.  Earlier versions of this tool corrupted the MOF file and produced unpredictable results.

Open the '
SMS_def.mof' in a text editor such as Notepad and add the following text to the end of the file:

//---------------------------------------------------------------
//-- Class: Win32_SystemEnclosure                              --
//---------------------------------------------------------------
                [SMS_Report(TRUE),
                SMS_Group_Name("System Enclosure"),
                SMS_Class_ID("MICROSOFT|System_Enclosure|1.0")]
class Win32_SystemEnclosure : SMS_Class_Template
{
                [SMS_Report(TRUE), key]
                string          Tag;
                [SMS_Report(True)]
                string          Caption;
                [SMS_Report(True)]
                string          Description;
                [SMS_Report(True)]
                string          Manufacturer;
                [SMS_Report(True)]
                string          Name;
                [SMS_Report(TRUE)]
                string          SerialNumber;
                [SMS_Report(False)]
                string          SMBIOSAssetTag;
                [SMS_Report(True)]
                string          Version;
};

Save this and run 'MOFManager' again.  At the end of the list you will see this new class named 'System Enclosure'.  Enable what you want to obtain, (if you cut and paste the above section, all but the 'AssetTag' information will be enabled), especially the serial number and save the new modified MOF.

NOTE: The whole process of editing the MOF can be done in Notepad - you don't have to use MOF Manager to do it.  In fact some SMS admins prefer to do this, once they feel comfortable with the MOF file.

Now comes the fun part.  Go back to the server location where you got the MOF from and make a copy of/ backup of/ rename the ORIGINAL MOF.  Copy your new/ revised MOF into the location where you copied the original from.

At the next Hardware Inventory, the new MOF will get copied to the clients and will be used.  You can speed this process up by forcing an inventory cycle on the client you are testing by:

  1. Opening 'Control Panel | Systems Management'.
     

  2. Click the 'Components' tab.
     

  3. Select the 'Hardware Inventory Agent'.
     

  4. Click the 'Start Component' button. A dialog box is displayed stating that the Hardware Inventory Agent will be started and may take several minutes to complete. Click on 'OK' if you want to proceed (if you click 'OK' this will start the 'SMS Hardware Inventory Agent Service').

By starting the Hardware Inventory cycle manually, this will force the new MOF down and a cycle to run.  Look in the 'Resource Information' for the machine you tested this with, you should see the new information and the system enclosure!

Keep your revised MOF handy as if you apply a Service Pack or have to rebuild your site, the modified MOF gets overwritten with the "original" unmodified file and you'll need to repeat this process again.
 

Inventorying Environment Variables

I was just wondering if anyone knows of a way to collect all of the environment variables from client machine. The idea is to query the database for specific Variables to find computers that have them.

Contributed By: Hans Schefske [MVP SMS]
You have enabled it in your MOF, check out these articles for editing your MOF:

MOF Editing Guide v2.5:
http://www.myitforum.com/articles/1/view.asp?id=2169

How to Apply the MOF Files:
http://www.myitforum.com/articles/1/view.asp?id=303

We use a specific Environment variable to identify all the different Business Units and base our high level collections on the value of the variable in SMS.
 

Is anyone using noidmifs?

Are there any people out there doing creative things with noidmifs? Is there any way for me to grab a section of the Registry and then post that in the Hardware Inventory section of the SMS inventory?

Specifically, what I want to grab is very much like grabbing the entire '
HKLM\Microsoft\Windows\CurrentVersion\Run' Registry key and all entries and or subkeys that exist there. Is this possible? I have looked at the excellent resource on the 1e.com web site but am having difficulty modifying for my purpose.

Check out this link. It's an article Kevan O'Leary submitted to myITforum a while back to show an example of how you can do what you're asking:

http://www.myitforum.com/articles/12/view.asp?id=4868

It's an example of how to make .MIFs to add to Hardware Inventory. It pulls information from the Registry and modifies a custom MIF with that information. You need to download both the script and the MIF to get the idea. Then you can apply these ideas to your own MIFs.
 

Loads of Data and Duplicate Data after Modifying SMS_DEF.MOF

Contributed By: Cliff Hobbs [MVP SMS]
So you've modified your SMS_DEF.MOF but now you're getting loads of data and duplicate data. Here's why ...  [Go to article]
 

New SMS_DEF.MOF not replicating

I've changed the sms_def.mof to adjust the hardware collection and have saved the file back to the appropriate location on the Site server.  All four CAPs have received the updated version but the clients - even after a few days - still have the original version.  Even new clients joining get the original version.

I have searched the CAPs and Site server for this version but it doesn't exist anywhere - only the new version.  Is it cached somehow/ somewhere?

It sounds like there must be a bug in your new SMS_DEF.MOF. Go to one of the clients and compile the new version on it to see if you get any error messages.

To compile it, go to the command prompt and type:

MOFCOMP SMS_DEF.MOF

It's a known problem that MOFMAN will corrupt the SMS_DEF.MOF, if you use an old MOFMAN (as from the Resource Kit), with SP1 or later SMS_DEF.MOF files. Use the MOFMAN from the latest Support Tools kit (as found on the download page at http://www.microsoft.com/smserver/downloads/20/default.asp).
 

New SMS_DEF.MOF not updating on CAPs

We changed our SMS_DEF.MOF file in 'sms\inboxes\clifiles.src\hinv' early this morning. It is now after noon and the CAPs have not been updated. How long does this usually take? What could be wrong?

Change the time on your next Hardware Inventory. Make it a few minutes from when you read this. At that point the CAPs will update and the changes to the MOF file will take place on the client side.
 

Old Names Still Appearing in the Database

We are going through a process of modifying the computer names in the plant. Some that were done 3 weeks ago are still showing the old names (as well as the new) within SMS.

How do I go about getting the database "cleaned up", that is remove the old names? This is under SMS 2.0/SP2.e.

Contributed By: Ed Aldrich [MVP SMS]
By creating a new name, you've essentially created a "new" system from SMS' perspective. The old name (old system) is now dormant (no new inventory occurring, etc - all new activity is against the 'new' system).

To clean out the old ones, bump up your HW inventory cycle to say, daily during this renaming process (or whatever increased cycle you need to suit your requirements)... in this way you can then build a Collection based upon "Last HW scan" date... update membership frequently... any members that arrive will be those systems that are now 'dormant' from an inventory point of view.

Use the Collection's '
Delete Special' function to delete the records completely from the database. Any systems that are still legitimate (e.g. owner is off on travel or vacation and doesn't do inventory soon enough) will be recreated upon their next inventory cycle.
 

Removing classes created with NOIDMIFs

I want to remove some classes that are created with NOIDMIFS from our SMS 2.0 Server. I know that SMS 1.2 had a sort of database cleaner. How do I do this in SMS 2.0?

Use the 'delgrp.exe' utility in the BackOffice 4.5 Resource Kit. Also take a look at 256073 'SMS: Dataloader Cannot Load MIF After Using DelGrp.exe to Remove Group Class'. The stored procedures are not cleaned up with this utility.
 

SMS and Serial Numbers

Contributed By: Cliff Hobbs [MVP SMS]
Here's some advice on using SMS to collect serial numbers ... [Go to article]
 

Using Access 2000 to Report on SMS Data

Contributed By: Chaz Dawkins
The best way I have found of retrieving data from SMS:

  1. Open a new Access 2000 database with an ODBC link to the SQL SMS database.
  2. Link all 'SMS_G_' system tables to the database.
  3. Go to pages in Access 2000.
  4. Drag and drop the tables into the Page from the field list as pivot tables or individual boxes (delete non required fields).
  5. View the page as web page.

This method seems to avoid duplicate entries (most of the time) and can be used to make tables of hardware for inventory purposes.

No doubt it could also be used for software inventory if different tables are put in the database.
 

What is the SMS Client Inventory Service and should I see it in SMS 2?

Our Exchange Admin just noticed that there is an SMS service running on one of the Exchange boxes we don't want SMS on. Its called 'SMS Client Inventory'. The rest of the SMS client is not installed, just this service. I looked through the Resource Guide and did not see mention of this service. Can somebody give me more information on the 'SMS Client Inventory' service and how to remove it?

Use the 'SRVINSTW.EXE' utility from NT 4.0 Resource Kit. Launch it and select 'Remove Service', then select 'Remote Machine' and the actual PC/ Server name and then finally select the service to be removed. It will remove the service instantly and then I recommend rebooting the PC/ server.

I believe it's a 1.2 SMS service. Probably remnants of 1.2 before your site was upgraded to 2.0. You might want to also check the '
C:' drive for 'C:\MS' and/ or 'C:\PCMSVC' folders which are from SMS 1.2 and can be deleted.
 

Where Can I Find Out More About WBEM?

Contributed By: Cliff Hobbs [MVP SMS]
You can find out more about standards such as Web-Based Enterprise Management (WBEM), System Management BIOS (SMBIOS), Common Information Model (CIM), and a whole host of others from the Distributed Management Task Force's website at:

http://www.dmtf.org/standards

Where Can I Find Out More About WMI?

Contributed By: Cliff Hobbs [MVP SMS]
Windows Management Instrumentation (WMI), is Microsoft's implementation of the Web-Based Enterprise Management (WBEM) standard.

You can download a tutorial on WMI from:

http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/001/574/msdncompositedoc.xml

You can also download the WMI Software Development Kit (SDK) at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_start_page.asp

Where Can I Get WMI 1.5?

In order to use the new SMSBIOS standard, your clients need to be running WMI version 1.5 (1085.005) which ships with Windows 2000. You can download the new version for use on Windows 95, 98, and NT 4.0 clients from the following link

http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/MSDN-FILES/027/001/576/msdncompositedoc.xml

Further information on the SMSBIOS standard can be found in the 'Collecting Asset Information with SMS 2.0' whitepaper available from the following link:

http://www.microsoft.com/smserver/techinfo/administration/20/using/getassetinfo.asp

Which fields hold the values for the last hardware/ software scan?

Which fields in the database hold the values for the last hardware/ software scan and the last time the MIF form was updated? Also, is the MIF form collected when the software scan is done, or at a different time? If it is different, which field would store this information?

MIF forms are only collected by Hardware Inventory. You can view the last time Hardware Inventory was collected in Resource Explorer - the class location is:

  • sms_g_system_workstationstatus (Hardware)

  • sms_g_system_lastsoftwarescan (Software)

As for being able to tell when the MIF form was updated, that would depend on a field in there I think as it just gets picked up at the next hardware scan.
 

Windows 2000 clients provide more detailed Inventory information that other clients

This is due to Windows 2000 clients including an updated version of WMI (version 1.5) that supports the new SMSBIOS standard. Details of the SMSBIOS standard and details of where you can obtain WMI 1.5 can be found from the Where can I get WMI 1.5? link on this page.

TechNet article 255924 'WMI Does Not Return SMSBIOS Data in Windows NT 4.0' explains why even if you have Windows NT 4.0 clients running the new version of WMI, the new inventory fields are empty (it also includes a workaround).
 

Windows 95, NT4 and WMI 1.5

Just wanted to share an experience. I, like many others, was recently gathering Serial Number information with WMI. I was using four client workstations (4 IBM 300PL's) 1 had Windows 2000, 2 had NT4, and 1 had 95. I installed the SMS 2.0 SP2 client on all the workstations. I received Serial Number information from the Windows 2000 machine, but not from the others.

I researched and upgraded to WMI 1.5 and still could not gather the Serial Number information, even though all four machines were the same. As I was in a lab environment I rebuilt the whole lab, this time installing WMI 1.5 FIRST. Lo and behold, I could now get Serial Number information from all of the clients (Windows 2000, NT4 & 95).

To cut a long story short, I think it's important to either install WMI 1.5 FIRST or recompile the MOF somehow after an upgrade (I couldn't figure out how to do that MOFCOMP attributes seem pretty scary).

The following link provides information on Re-installing WMI:

http://www.myitforum.com/articles/1/view.asp?id=4885

© FAQShop.com 2003 - 2008

Goto the SMS Home Page

Email the Author