Installation Guide

Inventory OneDrive Known Folder Move

In order to populate the OneDrive category in the data model you must extend hardware inventory by adding the configuration code below to the Configuration.mof on your primary site server and importing the import code into the default client settings on your primary site server. After importing the import code you may choose to apply it in the default client settings but we recommend always using custom client agent settings when possible. If you are not interested in reporting on Known Folder Move you can safely ignore these steps.

For more information on extending Configuration Manager hardware inventory see the section Add a new inventory class on the How to extend hardware inventory in Configuration Manager documentation page.

Be aware that copying code containing quotation marks from the Internet often leads to issues. Browsers tend to convert double quotes into smart quotes. You may need to do a find and replace on the code to replace smart quotes with double quotes.

//===================================================

// Configuration Code

//Add to the Configuration.mof for Fatstacks KFM

//===================================================


#pragma namespace ("\\\\.\\root\\cimv2")

#pragma deleteclass("FATSTACKS_ONEDRIVE", NOFAIL)

[DYNPROPS]

Class FATSTACKS_ONEDRIVE

{

[key] string KeyName;

Uint32 KFMBlockOptOut;

String KFMSilentOptIn;

Uint32 KFMSilentOptInWithNotification;

String KFMOptInWithWizard;

Uint32 SilentAccountConfig;

Uint32 GPOSetUpdateRing;

Uint32 GPOEnabled;

Uint32 FilesOnDemandEnabled;

};


[DYNPROPS]

Instance of FATSTACKS_ONEDRIVE

{

KeyName="RegKeyToMOF";

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\OneDrive|KFMBlockOptOut"),Dynamic,Provider("RegPropProv")] KFMBlockOptOut;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\OneDrive|KFMSilentOptIn"),Dynamic,Provider("RegPropProv")] KFMSilentOptIn;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\OneDrive|KFMSilentOptInWithNotification"),Dynamic,Provider("RegPropProv")] KFMSilentOptInWithNotification;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\OneDrive|KFMOptInWithWizard"),Dynamic,Provider("RegPropProv")] KFMOptInWithWizard;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\OneDrive|SilentAccountConfig"),Dynamic,Provider("RegPropProv")] SilentAccountConfig;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\OneDrive|GPOSetUpdateRing"),Dynamic,Provider("RegPropProv")] GPOSetUpdateRing;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\OneDrive|GPOEnabled"),Dynamic,Provider("RegPropProv")] GPOEnabled;

[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\OneDrive|FilesOnDemandEnabled"),Dynamic,Provider("RegPropProv")] FilesOnDemandEnabled;

};

//===================================================

// Import Code

//Import to Hardware Inventory Fatstacks KFM

//===================================================


#pragma namespace ("\\\\.\\root\\cimv2\\SMS")

#pragma deleteclass("FATSTACKS_ONEDRIVE", NOFAIL)

[SMS_Report(TRUE),SMS_Group_Name("FATSTACKS_ONEDRIVE"),SMS_Class_ID("FATSTACKS_ONEDRIVE")]

Class FATSTACKS_ONEDRIVE: SMS_Class_Template

{

[SMS_Report(TRUE)] Uint32 KFMBlockOptOut;

[SMS_Report(TRUE)] String KFMSilentOptIn;

[SMS_Report(TRUE)] Uint32 KFMSilentOptInWithNotification;

[SMS_Report(TRUE)] String KFMOptInWithWizard;

[SMS_Report(TRUE)] Uint32 SilentAccountConfig;

[SMS_Report(TRUE)] Uint32 GPOSetUpdateRing;

[SMS_Report(TRUE)] Uint32 GPOEnabled;

[SMS_Report(TRUE)] Uint32 FilesOnDemandEnabled;

};