Making a Custom MOF with an Embedded Script
I see custom MOF files less frequently now than I used to in the past. However, sometimes they are a good tool for the job. Recently I made a custom MOF to report on the current TPM status for reporting purposes in ConfigMgr (since by default the Win32_Tpm class only reports the initial status values when the class is created. In this post I'll walk you through what I did so that you can steal, err, adapt it for whatever you desire.
WMI is awesome. So much good data is contained in such an easily accessible “database”. Hard drive information, software installs, printer information, services, man oh man there is so much data available to you. Sometimes however, you just have to have more.