Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X
Aside

Mini Monster Mof Builder Updated to 1.11

http://myitforum.com/cs2/blogs/skissinger/archive/2008/10/28/mini-monster-mof-builder.aspx

The Mof builder has been updated to 1.11.  This is a fantastic tool, definitely check this out if you haven’t seen it before.

Here is a snippet:

“For SMS 2003 SP2 and earlier, there were popular downloads available for what were known as "the Monster Mof".  They were great, but in my opinion could be bloated.  For example, it would contain edits for 3 different anti-virus vendors.  Most companies usually only had 1, or if they were really diverse, possibly 2.  As an admin, you either put in the entire monster and lived with the bloat, or edited the Monster anyway, and either removed edits or set them to FALSE.

Since SP2, edits have been accumulating.  Most of which have been blogged on MyITForum, but they are often difficult to find.  There’s a zip file with all of the text snippets here, but even that could be daunting to the admin who rarely edits the mof.

So… here’s another, different way to pick and choose which MOF extensions you might want in your environment.  Download the attached file, unzip it, and rename it from .txt to .hta, and double-click it.  You’ll be presented with the below.  Please look at Misc Notes, and the specific instructions for SMS2003 vs. ConfigMgr.  You can use the ? to get more info on a particular snippet, which may lead you to additional blog entries.  Once you’ve decided which 1 (or 5) extensions you might want in your environment, check those items on, and at the bottom, click "Compile & Display".  You will then have 1 (or 2) text files with your own "mini monster" to add to your mof files on the server.  As useful mof edits continue to accumulate, the download will be updated; at least until a better method for sharing mof snippets appears!”

Aside

Migrating SMS 2003 sms_def.mof customizations to ConfigMgr 2007

I had a question when moving my mof customizations to ConfigMgr, what goes where? 

Sherry Kissinger replied back and I wanted to post it for others as well.

the sections that start with

#pragma namespace for cimv2\sms go to sms_def.mof

the sections that start with

#pragma namespace for cimv2  to go configuration.mof

 

Hope this helps.

Aside

Microsoft Deployment Toolkit – Tattoo Information

Another great feature of MDT integration with SMS/ConfigMgr is the information that is tattoo’d into the system during deployment.  Through the use of a sms_def.mof extension, you can then report against this information and create a web report or reports to identify imaged systems and the relevant information you want to see.


In the MDT documentation and scripts you will see “Tattoo” spelt “Tatoo”.  It’s been that way for a long time 🙂 Just be aware, i’m not mispelling it. 


What I’ve done is created a web report that can show me when the system was imaged, the deployment type used (ZTI Refresh or a Media/PXE boot), the OSD adv ID, and the OSD Program Name used.  The below screenshot samples are specifically from SMS 2003 and MDT 2008, however the information is still relevant with SCCM and MDT 2010 and I’ve provided information for MDT 2010 and SCCM. 


When a system is built using MDT integration, the ZTITatoo.wsf script embeds this information into the registry, then using your MOF extension you can then collect and report against this information.


The following properties are available to MDT 2008:


 



DeploymentMethod, DeploymentType, OSDAdvertID, OSDPackageID, OSDProgramID, OSDSiteCode, OSVersion, TaskSequenceID, TaskSequenceName, TaskSequenceVersion


 


The following properties are available to MDT 2010:


DeploymentMethod, DeploymentType, DeploymentTimestamp, BuildID, BuildName,           BuildVersion, OSDPackageID, OSDProgramName, OSDAdvertisementID, TaskSequenceID, TaskSequenceName, TaskSequenceVersion


This is the process that runs with MDT 2008 and MDT 2010 per the MDT Documentation:


1. Locate and copy the ZTITatoo.mof file to the %SystemRoot%\System32\Wbem folder. Any preexisting ZTITatoo.mof that exists at the destination will be deleted before starting the copy operation.


2. Mofcomp.exe will be run using the following command: %SystemRoot%\System32\Wbem\Mofcomp.exe -autorecover %SystemRoot%\System32\Wbem\ZTITatoo.mof.


3. These deployment details are written to the registry at HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4:


· Deployment Method is set to DeploymentMethod.


· Deployment Type is set to DeploymentType.


· Deployment Timestamp is set to the current date in WMI date format.


· Task Sequence ID is set to TaskSequenceID.


· Task Sequence Name is set to TaskSequenceName.


· Task Sequence Version is set to TaskSequenceVersion.


4. If OSDPACKAGEID is not NULL, these deployment details are written to the registry at HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4:


· OSD Package ID is set to OSDPACKAGEID.


· OSD Program Name is set to OSDPROGRAMID.


· OSD Advertisement ID is set to OSDADVERTID.


5. If OSDPACKAGEID is not NULL, these deployment details are written to the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion:


· CM_DSLID is set to OSDSITECODE:OSDPACKAGEID.


Sample Web Report for SMS 2003/MDT 2008:


image


SMS 2003/MDT 2008 MOF Extension:


// MDT 2008 Deployment Data, added by (name) (date)
// —————————————————-


#pragma namespace (“\\\\.\\root\\cimv2\\sms”)
[ SMS_Report     (True),
  SMS_Group_Name (“Microsoft BDD Info”),
  SMS_Class_ID   (“MICROSOFT|MicrosoftBDDInfo|1.0”) ]
class Microsoft_BDD_Info : SMS_Class_Template
{
    [SMS_Report (TRUE), key ]  
        string InstanceKey;
    [SMS_Report (TRUE)      ]  
        string DeploymentMethod;
    [SMS_Report (TRUE)      ]  
        string DeploymentType;
    [SMS_Report (TRUE)      ]  
        string DeploymentTimeStamp;
    [SMS_Report (TRUE)      ]  
        string BuildID;
    [SMS_Report (TRUE)      ]  
        string BuildName;
    [SMS_Report (TRUE)      ]  
        string BuildVersion;
    [SMS_Report (TRUE)      ]  
        string OSDPackageID;
    [SMS_Report (TRUE)      ]  
        string OSDProgramName;
    [SMS_Report (TRUE)      ]  
        string OSDAdvertisementID;
};


ConfigMgr MDT 2010 MOF Extension:


// MDT 2010 Deployment Data, added by (name) (date)
// —————————————————-


[ SMS_Report     (True),
  SMS_Group_Name (“Microsoft BDD Info”),
  SMS_Class_ID   (“MICROSOFT|MicrosoftBDDInfo|1.0”) ]
class Microsoft_BDD_Info : SMS_Class_Template
{


    [SMS_Report (TRUE), key ]  
        string InstanceKey;
    [SMS_Report (TRUE)      ]  
        string DeploymentMethod;
    [SMS_Report (TRUE)      ]  
        string DeploymentType;
    [SMS_Report (TRUE)      ]  
        string DeploymentTimeStamp;
    [SMS_Report (TRUE)      ]  
        string BuildID;
    [SMS_Report (TRUE)      ]  
        string BuildName;
    [SMS_Report (TRUE)      ]  
        string BuildVersion;
    [SMS_Report (TRUE)      ]  
        string OSDPackageID;
    [SMS_Report (TRUE)      ]  
        string OSDProgramName;
    [SMS_Report (TRUE)      ]  
        string OSDAdvertisementID;
    [SMS_Report (TRUE)      ]  
        string TaskSequenceID;
    [SMS_Report (TRUE)      ]  
        string TaskSequenceName;
    [SMS_Report (TRUE)      ]  
        string TaskSequenceVersion;



};

Aside

ConfigMgr – Enabling Asset Intelligence

Based upon the info provided here:

http://blogcastrepository.com/blogs/brian_tucker/archive/2008/02/13/how-to-enable-asset-intelligence-client-access-licensing-in-sccm-2007.aspx

Anyone who has read the whitepapers, knows they aren’t they greatest/clearest on what is really needed.  Brian Tucker put together and nice short and sweet blog (linked above) that details the extra steps needed to enable Asset Intelligence in SCCM.  I noticed that on my ConfigMgr SP2 beta install, the sections in sms_def.mof were already enabled, so that might be fixed in SP2. I did still need to enable the CAL information in the Configuration.mof though.

Here are the main sections in sms_def.mof:

//**************************************************************************
//* Class: SoftwareLicensingService
//* Derived from: (nothing)
//*
//* Key = Version
//*
//* This Asset Intelligence class provides Software Licensing Service information for vista OS.
//*
//**************************************************************************
[ dynamic, provider("SoftwareLicensingService_Provider"),
  SMS_Report     (TRUE),
  SMS_Group_Name ("SW Licensing Service"),
  SMS_Class_ID   ("MICROSOFT|SOFTWARE_LICENSING_SERVICE|1.0") ]
class SoftwareLicensingService
{
    [SMS_Report (TRUE), Key]
    string    Version;
    [SMS_Report (TRUE)]
    string    KeyManagementServiceMachine;
    [SMS_Report (TRUE)]
    uint32    IsKeyManagementServiceMachine;
    [SMS_Report (TRUE)]
    uint32    VLActivationInterval;
    [SMS_Report (TRUE)]
    uint32    VLRenewalInterval;
    [SMS_Report (TRUE)]
    uint32    KeyManagementServiceCurrentCount;
    [SMS_Report (TRUE)]
    uint32    RequiredClientCount ;
    [SMS_Report (TRUE)]
    string    KeyManagementServiceProductKeyID ;
    [SMS_Report (TRUE)]
    uint32    PolicyCacheRefreshRequired ;
    [SMS_Report (TRUE)]
    string    ClientMachineID;
};

//**************************************************************************
//* Class: SoftwareLicensingProduct
//* Derived from: (nothing)
//*
//* Key = ID
//*
//* This Asset Intelligence class provides Software Licensing Product information for vista OS.
//*
//**************************************************************************
[ dynamic, provider("SoftwareLicensingProduct_Provider"),
  SMS_Report     (TRUE),
  SMS_Group_Name ("SW Licensing Product"),
  SMS_Class_ID   ("MICROSOFT|SOFTWARE_LICENSING_PRODUCT|1.0") ]
class SoftwareLicensingProduct
{
    [SMS_Report (TRUE), key]
    string    ID;
    [SMS_Report (TRUE)]
    string    Name;
    [SMS_Report (TRUE)]
    string    Description;
    [SMS_Report (TRUE)]
    string    ApplicationID;
    [SMS_Report (TRUE)]
    string    ProcessorURL;
    [SMS_Report (TRUE)]
    string    MachineURL;
    [SMS_Report (TRUE)]
    string    ProductKeyURL;
    [SMS_Report (TRUE)]
    string    UseLicenseURL;
    [SMS_Report (TRUE)]
    string    OfflineInstallationId;
    [SMS_Report (TRUE)]
    string    PartialProductKey;
    [SMS_Report (TRUE)]
    string    ProductKeyID;
    [SMS_Report (TRUE)]
    uint32    LicenseStatus;
    [SMS_Report (TRUE)]
    uint32    GracePeriodRemaining;
    [SMS_Report (TRUE)]
    datetime   EvaluationEndDate;
};

 

And here is the section in the Configuration.mof:

// CAL tracking server side configurations and policy
[Singleton]
class CCM_CALTrackConfig
{
    uint32   CALCollectionType;
    uint32   CALCollectionFrequencyDays;
    uint32   CALCollectionFrequencyMinutes;
    uint32   CALCollectionTimeWindow;
    string   CALCollectionSupportedWindowsVersions;

};

instance of CCM_CALTrackConfig
{
    CALCollectionType = 3; //0-Disabled, 1-User CAL, 2-Device CAL, 3-All
    CALCollectionFrequencyDays = 7;
    CALCollectionFrequencyMinutes = 60;
    CALCollectionTimeWindow = 90;
    CALCollectionSupportedWindowsVersions = "5.0,5.2,6.0";

};

Aside

SMS 2003 – Inventory Local Installed Printers

This information is provided as is.  Do not perform any of the steps below if you are not familiar with the processes!

 

In order to show the local printers installed on computers we need to first enable discovery of that information.  This will require modifying the sms_def.mof to enable the information we want collected.

Go to your \SMS\inboxes\clifiles.src\hinv and open up your sms_def.mof, once you have your MOF open, then search for “win32_printer” and you should jump to the “Printer Device” section:

image

Under this section you will see [SMS_Report (FALSE)     ]  sections.  You will need to change the false to true for any section you want to pull information from.

Here are the sections i recommend you enable (DO NOT DELETE ANYTHING):

    [SMS_Report (TRUE)     ]
        string     Description;
    [SMS_Report (TRUE), key]
        string     DeviceID;
    [SMS_Report (TRUE)     ]
        string     DriverName;
        string     Location;
    [SMS_Report (TRUE)     ]
        string     Name;
    [SMS_Report (TRUE)     ]
        string     PortName;

Once you have made these changes, you can save and exit the MOF.  Once your clients run their next hardware inventory cycle, then you should have information in the DB that you can now query in a web report or in SQL query analyzer.

The information will show up under v_gs_printer_device

One web report I have created is “Show All Local Printers”, here is the query i use for this report.

select netbios_name0, pri.name0, drivername0, portname0
from v_gs_printer_Device pri
join v_r_system on pri.resourceid = v_r_system.resourceid
where drivername0 NOT LIKE ‘%PDF%’ AND
drivername0 NOT LIKE ‘%MICROSOFT%’ AND
drivername0 NOT LIKE ‘Biscom FAX%’ AND
drivername0 NOT LIKE ‘SnagIT%’
order by netbios_name0

You can see i exempted out a few things that are common in our environment, you may have others you might need to exempt from the results.

Hope this helps,

Chris

Aside

Mark Cochrane’s RegKeytoMof

I’ll just ping Sherry’s post on this:

http://myitforum.com/cs2/blogs/skissinger/archive/2009/04/13/mark-cochrane-s-regkeytomof.aspx

 

Very cool tool for grabbing registry info for MOF edits you want to do.  Read her post for more information.