Extending SMS 2003 Inventory

Download Report

Transcript Extending SMS 2003 Inventory




Sherry Kissinger, Wells Fargo
[email protected]
Microsoft MVP - ConfigMgr

Hardware Inventory
◦ Sms_def.mof contains the rules from which the
Hardware Inventory policy is compiled

WMI items
◦ Windows Management Instrumentation contains
lots of information about the computer in a
structured manner.

Registry items
◦ HW Inv can also pull information from registry keys,
with some limitations. It cannot successfully query
Hkey_Current_User.

This file is contained on your Primary Site
servers, in the folder
inboxes\clifiles.src\hinv. This speciallyformatted file is used by Configuration
Manager to create or update the Hardware
Inventory policy. This policy is forwarded to
your Management Points, similar to all other
policies. Using this policy, clients know
“what” to report via HW Inv.

This file is contained on your Primary Site
servers, in the folder
inboxes\clifiles.src\hinv. This policy is
forwarded to your Management Points,
similar to all other policies. Using this
specially formatted file, clients will ‘compile’
the contents of this file. Using this policy,
clients know “how” to report on some
extensions asked of the client from the
sms_def.mof policy.



After you change sms_def.mof or
configuration.mof on your primary site server
the hardware inventory policy is changed and
clients will pick up the new policy at their
next policy refresh.
Monitor successful changes at your primary
sites by watching the ‘dataldr.log’ file.
Monitor policy changes at the client in
policyagent.log & policyevaluator.log


If in the default sms_def.mof there are
existing classes that are currently set to
“FALSE”, you can change that report class to
“TRUE” (the opposite is valid as well, changing
TRUE to False). Your clients already know
about that reporting structure, in that case
you are just modifying the policy.
If you are asking for existing WMI classes,
your clients already have those. In that case
you are just modify the policy.


To determine what you may not need enabled
in your environment, on a standard client,
check inventoryagent.log. Look for “…does
not exist out”.
Create a report for that item, see if any
machine has reported data. Based on the
report, you may decide to set something to
FALSE, whether an entire class or an
individual item.




Contents of the local “Administrators” group
Physical Memory modules
AntiVirus information (McAfee, Symantec)
SMS Client Advanced Client Cache






FALSE to TRUE to gather environment keys
Local Administrators
Client Cache Size
Remote Assistance
Disabling existing class
SiteSweeper (cleanup obsolete tables)

Security
◦ Contents of the local administrators’ group

Time Saving
◦ Find machines that have two 512mb chips vs one
1gb chip; and plan memory upgrades without
physically opening every computer

Application settings
◦ Many applications store settings in registry keys,
you can extend the mof to pull in that information.


Client doesn’t report correctly
This often happens if the client is a different version
than the server. The default
sms_def.mof/configuration.mof have been known to
change with SP updates. The client should match the
server.
Hardware Inventory Action missing
Even if a mofcomp –check succeeds on your
configuration.mof file, the client may reject it. The
syntax of the file is usually correct enough to pass a –
check, but in reality is not a valid file. Undo your
configuration.mof change to get HW inventory action
back. Then really scour your edit. Perhaps you have
only one \ instead of two \\ in the right place. Or
you’re missing a { or a };

Under <ConfigMgr folder>\data\hinvarchive,
will be the last several edits.


Grab “delgrp” from SMSToolkit 2. Pretending you turned on Time_Zone in sms_def.mof months ago, but last week you turned it off, and
now you want to get that clutter out of your database, but you don’t want to use SiteSweeper…
Delete Tables in SQL
delgrp /L
<sanity check> lists all delete-able tables; confirm the group name visually
delgrp "MICROSOFT|TIME_ZONE|1.0" /C
<sanity check> /c means show me any Collections which might be based on values reported in this class. If you have collections based
on this hardware inventory element--maybe you do not want to delete this. Verify there are no advertisements, etc. going to those
collections, or delete the collections manually first.
Stop the SMS Exec Service
delgrp "MICROSOFT|TIME_ZONE|1.0"
Start the SMS Exec Service

Delete Views in SQL
Launch SQL Admin Console, and browse to the Views
find v_GS_TIMEZONE, right-click, choose "Delete", then pick "Drop All" Repeat for v_HS_TIMEZONE

Delete stored procedures
browse to stored procedures in the SQL admin console
scroll until you find pTime_Zone_data, rightlick, "Delete", "Drop All" Repeat for d_Time_Zone_Data
<sanity check> if you have multiple primary sites, repeat on each primary.
NOTE: may need mfc70.dll, msvcr70.dll, and msvcp70.dll from an SMS2003 installation CD in order to use Delgrp on a ConfigMgr installation.

Microsoft’s SMS 2003 editing the mof:

Microsoft’s SCCM2007 editing the mof:

SMSExpert
http://www.microsoft.com/technet/prodtechnol/sms/sms2003/opsguide/ops_0720.mspx
http://www.microsoft.com/technet/prodtechnol/sms/smsv4/smsv4_help/b79a70ea-231d-4bfd84e5-f14497802d78.mspx
(http://www.sccmexpert.com)
◦ MOF ebook editing guide http://www.sccmexpert.com/MOF/Guide.aspx
◦ SiteSweeper http://www.sccmexpert.com/Products/SiteSweeper.aspx
◦ Completed MOF extensions for many popularly requested items
http://www.sccmexpert.com/MOF/Scripts.aspx
◦ [email protected]




MyitForum (http://www.myitforum.com)
Inventory Wiki (http://www.myitforum.com/myITWiki/SCCMINV.ashx)
DudeWorks (http://www.dudeworks.com/)
Some Blogs:
◦ http://myitforum.com/cs2/blogs/skissinger
◦ http://smsug.ca/blogs/garth_jones/default.aspx
◦ http://myitforum.com/cs2/blogs/jgilbert/