WaaS 1809 – Regkey to MOF

We are currently writing several keys & values to the registry for our process to collect metrics, more details HERE: Registry Values used in WaaS Process for reporting

So, you have all that awesome data from your upgrades, and you want to collect it into your database for reporting, Registry to MOF is the key.  Garth wrote up a nice blog giving directions. How to Use RegKeyToMof – Ask Garth

And Paul too: RegKeyToMof – A Bit on How it Works | Wetter’s Source (wetterssource.com)

So now that you’ve read that and understand how it works, I can skip much of the detail and show you how it looks for the WaaS Process.

To get the tool: GitHub – AlzheimerZA/RegKeyToMOF_v36: RegKeyToMOF Tool by MVP Mark Cochrane

Basically you upgrade a machine, get a bunch of the WaaS Keys on a machine, then run the tool… it will look like:
image

That will get you most of the way there,  You can then add rest of the values you need manually: https://garytown.com/registry-values-used-in-waas-process-for-reporting

So you add the Config Mof to the Server like so:

image

image

Then you need to Import the other MOF file into your Hardware Inventory in the client center.

image

Clicking import… browse to the MOF.

image

image

Ok, so now you’ve got your inventory setup to gather that information.

Once machines have started uploading their data.. you can look at it in SQL… and make reports!
image

MOFs (Will also be included in the Collection Download)
image

Code:

Configuration.Mof

// RegKeyToMOF by Mark Cochrane (with help from Skissinger, SteveRac, Jonas Hettich, Kent Agerlund & Barker)
// this section tells the inventory agent what to collect
// 5/20/2019 9:27:27 PM

#pragma namespace ("\\\\.\\root\\cimv2")
#pragma deleteclass("cm_WaaS", NOFAIL)
[dynamic, provider("RegProv"), ClassContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\WaaS")]
Class cm_WaaS
{
[key] string KeyName;
[PropertyContext("CompatScanAttempts")] String CompatScanAttempts;
[PropertyContext("CompatScanDownloadTime")] String CompatScanDownloadTime;
[PropertyContext("CompatScanHardBlock")] String CompatScanHardBlock;
[PropertyContext("CompatScanLastRun")] String CompatScanLastRun;
[PropertyContext("CompatScanReturnCode")] String CompatScanReturnCode;
[PropertyContext("CompatScanReturnStatus")] String CompatScanReturnStatus;
[PropertyContext("CompatScanRunTime")] String CompatScanRunTime;
[PropertyContext("CompatScanVPN")] String CompatScanVPN;
[PropertyContext("IPUAttempts")] String IPUAttempts;
[PropertyContext("IPUBuild")] String IPUBuild;
[PropertyContext("IPUDeploymentID")] String IPUDeploymentID;
[PropertyContext("IPUExecutionTypeUser")] String IPUExecutionTypeUser;
[PropertyContext("IPUFailedAttempts")] String IPUFailedAttempts;
[PropertyContext("IPUFailedStepName")] String IPUFailedStepName;
[PropertyContext("IPUFailedStepReturnCode")] String IPUFailedStepReturnCode;
[PropertyContext("IPULastRun")] String IPULastRun;
[PropertyContext("IPUPackageID")] String IPUPackageID;
[PropertyContext("IPUUserVPN")] String IPUUserVPN;
[PropertyContext("IPURebootPending")] String IPURebootPending;
[PropertyContext("IPUReturnCode")] String IPUReturnCode;
[PropertyContext("IPUReturnStatus")] String IPUReturnStatus;
[PropertyContext("IPURunTime")] String IPURunTime;
[PropertyContext("IPUSetupTime")] String IPUSetupTime;
[PropertyContext("IPUUserAccount")] String IPUUserAccount;
[PropertyContext("IPUUserLoggedOn")] String IPUUserLoggedOn;
[PropertyContext("OSUninstall_Accounts")] String OSUninstall_Accounts;
[PropertyContext("OSUninstall_AnotherReason")] String OSUninstall_AnotherReason;
[PropertyContext("OSUninstall_AppIssue")] String OSUninstall_AppIssue;
[PropertyContext("OSUninstall_AppName")] String OSUninstall_AppName;
[PropertyContext("OSUninstall_ContactAllowed")] String OSUninstall_ContactAllowed;
[PropertyContext("OSUninstall_ContactPerson")] String OSUninstall_ContactPerson;
[PropertyContext("OSUninstall_Date")] String OSUninstall_Date;
[PropertyContext("OSUninstall_DeviceIssue")] String OSUninstall_DeviceIssue;
[PropertyContext("OSUninstall_DeviceName")] String OSUninstall_DeviceName;
[PropertyContext("OSUninstall_EarlierBuild")] String OSUninstall_EarlierBuild;
[PropertyContext("OSUninstall_ExitCode")] String OSUninstall_ExitCode;
[PropertyContext("OSUninstall_NumberTimes")] String OSUninstall_NumberTimes;
[PropertyContext("OSUninstall_TellUsMore")] String OSUninstall_TellUsMore;
[PropertyContext("OSUninstall_UserAccount")] String OSUninstall_UserAccount;
[PropertyContext("PreFlightAttempts")] String PreFlightAttempts;
[PropertyContext("PreFlightLastRun")] String PreFlightLastRun;
[PropertyContext("PreFlightReturnCode")] String PreFlightReturnCode;
[PropertyContext("PreFlightReturnStatus")] String PreFlightReturnStatus;
[PropertyContext("PreFlightReturnCode")] String PreFlightRuntime;
[PropertyContext("PreFlightVersion")] String PreFlightVersion;
[PropertyContext("RollBackLog")] String RollBackLog;
[PropertyContext("RollBackPhase")] String RollBackPhase;
[PropertyContext("WaaS_Phase")] String WaaS_Phase;
[PropertyContext("WaaS_Stage")] String WaaS_Stage;
};

Client Settings Hardware Inv Import

[ SMS_Report (FALSE),
  SMS_Group_Name ("cm_WaaS"),
  SMS_Class_ID ("MICROSOFT|CM_WAAS|1.0"),
  Namespace ("root\\\\cimv2") ]
class cm_WaaS : SMS_Class_Template
{
    [ SMS_Report (FALSE), key ]    String     KeyName;
    [ SMS_Report (FALSE) ]    String     CompatScanAttempts;
    [ SMS_Report (FALSE) ]    String     CompatScanDownloadTime;
    [ SMS_Report (FALSE) ]    String     CompatScanHardBlock;
    [ SMS_Report (FALSE) ]    String     CompatScanLastRun;
    [ SMS_Report (FALSE) ]    String     CompatScanReturnCode;
    [ SMS_Report (FALSE) ]    String     CompatScanReturnStatus;
    [ SMS_Report (FALSE) ]    String     CompatScanRunTime;
    [ SMS_Report (FALSE) ]    String     CompatScanVPN;
    [ SMS_Report (FALSE) ]    String     IPUAttempts;
    [ SMS_Report (FALSE) ]    String     IPUBuild;
    [ SMS_Report (FALSE) ]    String     IPUDeploymentID;
    [ SMS_Report (FALSE) ]    String     IPUExecutionTypeUser;
    [ SMS_Report (FALSE) ]    String     IPUFailedAttempts;
    [ SMS_Report (FALSE) ]    String     IPUFailedStepName;
    [ SMS_Report (FALSE) ]    String     IPUFailedStepReturnCode;
    [ SMS_Report (FALSE) ]    String     IPULastRun;
    [ SMS_Report (FALSE) ]    String     IPUPackageID;
    [ SMS_Report (FALSE) ]    String     IPUUserVPN;
    [ SMS_Report (FALSE) ]    String     IPURebootPending;
    [ SMS_Report (FALSE) ]    String     IPUReturnCode;
    [ SMS_Report (FALSE) ]    String     IPUReturnStatus;
    [ SMS_Report (FALSE) ]    String     IPURunTime;
    [ SMS_Report (FALSE) ]    String     IPUSetupTime;
    [ SMS_Report (FALSE) ]    String     IPUUserAccount;
    [ SMS_Report (FALSE) ]    String     IPUUserLoggedOn;
    [ SMS_Report (FALSE) ]    String     OSUninstall_Accounts;
    [ SMS_Report (FALSE) ]    String     OSUninstall_AnotherReason;
    [ SMS_Report (FALSE) ]    String     OSUninstall_AppIssue;
    [ SMS_Report (FALSE) ]    String     OSUninstall_AppName;
    [ SMS_Report (FALSE) ]    String     OSUninstall_ContactAllowed;
    [ SMS_Report (FALSE) ]    String     OSUninstall_ContactPerson;
    [ SMS_Report (FALSE) ]    String     OSUninstall_Date;
    [ SMS_Report (FALSE) ]    String     OSUninstall_DeviceIssue;
    [ SMS_Report (FALSE) ]    String     OSUninstall_DeviceName;
    [ SMS_Report (FALSE) ]    String     OSUninstall_EarlierBuild;
    [ SMS_Report (FALSE) ]    String     OSUninstall_ExitCode;
    [ SMS_Report (FALSE) ]    String     OSUninstall_NumberTimes;
    [ SMS_Report (FALSE) ]    String     OSUninstall_TellUsMore;
    [ SMS_Report (FALSE) ]    String     OSUninstall_UserAccount;
    [ SMS_Report (FALSE) ]    String     PreFlightAttempts;
    [ SMS_Report (FALSE) ]    String     PreFlightLastRun;
    [ SMS_Report (FALSE) ]    String     PreFlightReturnCode;
    [ SMS_Report (FALSE) ]    String     PreFlightReturnStatus;
    [ SMS_Report (FALSE) ]    String     PreFlightRuntime;
    [ SMS_Report (FALSE) ]    String     PreFlightVersion;
    [ SMS_Report (FALSE) ]    String     RollBackLog;
    [ SMS_Report (FALSE) ]    String     RollBackPhase;
    [ SMS_Report (FALSE) ]    String     WaaS_Phase;
    [ SMS_Report (FALSE) ]    String     WaaS_Stage;
};

3 thoughts on “WaaS 1809 – Regkey to MOF”

Leave a Reply to gwblok Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.