ConfigurationManager.ManagedObjectFormat 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ConfigurationManager.ManagedObjectFormat --version 1.0.1                
NuGet\Install-Package ConfigurationManager.ManagedObjectFormat -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ConfigurationManager.ManagedObjectFormat" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ConfigurationManager.ManagedObjectFormat --version 1.0.1                
#r "nuget: ConfigurationManager.ManagedObjectFormat, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ConfigurationManager.ManagedObjectFormat as a Cake Addin
#addin nuget:?package=ConfigurationManager.ManagedObjectFormat&version=1.0.1

// Install ConfigurationManager.ManagedObjectFormat as a Cake Tool
#tool nuget:?package=ConfigurationManager.ManagedObjectFormat&version=1.0.1                

ConfigMgr.Inventory

Summary:

Provides a simple interface to extend and manage Configuration Managers Hardware Inventory Schema through the Schema and Extension classes.

Usage:

///////////////////////////////////////////////////////////////////////////////////////////////////////////

//Define Inventory Extension
Extension inventoryExtension = new InventoryExtension()
{
    SMSClassID = "MICROSOFT|PMPC_USERAPPS|1.0",
    ClassName = "PMPC_UserApps",
    SMSGroupName = "PMPC UserApps",
    Properties = new string[]
    {
        "InstallLocation",
        "DisplayName",
        "DisplayVersion",
        "QuietUninstallString",
        "UninstallString",
        "Publisher",
        "InstallDate",
        "User"
    }
};

//or use schema class to populate Extension Collection
Extension[] inventoryExtensions = Schema.GetFromJson("pathToJson")

///////////////////////////////////////////////////////////////////////////////////////////////////////////

//define connection options if required
ConnectionOptions options = new ConnectionOptions();
ManagementScope scope = new ManagementScope($@"\\{smsProviderServer}\ROOT\SMS\site_{siteCode}", options);

//Or define scope as simple string
string scope = $@"\\{smsProviderServer}\ROOT\SMS\site_{siteCode}";

///////////////////////////////////////////////////////////////////////////////////////////////////////////

foreach ( Extension inventoryExtension in inventoryExtensions )
{
  //Install
  inventoryExtension.Install(scope)  
  
  //Enable
  inventoryExtension.Enable(scope);
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////

ConfigMgr.Inventory.Schema

Methods

  • GetFromJson(path) : Returns a collection of Extensions defined in the json.

ConfigMgr.Inventory.Extension

Methods

  • Install(scope) : Installs / updates a custom class in the Hardware Inventory Schema.
  • Uninstall(scope): Removes Extension from Hardware Inventory Schema. Deletes related data from database.
  • Enable(scope): Enables the class for reporting on default client settings.
  • Disable(scope): Disables the class for reporting on default client settings.

Method Arguments

All Methods must be provided the ManagementScope. This is the Management Path to the SMS Provider Servers WMI Namespace:

//define connection options if required
ConnectionOptions options = new ConnectionOptions();
ManagementScope scope = new ManagementScope($@"\\{smsProviderServer}\ROOT\SMS\site_{siteCode}", options);

//Or define scope as simple string
string scope = $@"\\{smsProviderServer}\ROOT\SMS\site_{siteCode}";

Properties

  • (String) SMSClassID: The Class ID that will be used to generate the database table, view, and the UI SDK class.
  • (String) ClassName: The name of the WMI Class.
  • (String) SMSGroupName: The default class name displayed in the MOF editor and Resource Explorer if no localized resources are provided.
  • (String[]) Properties: The list of properties belonging to the WMI Class to be inventoried. It is assumed that the first property in the array will be the key property in the database.

Requirements

  • System.Management Namespace (available as a Nuget Package in .NET Core)
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 377 12/20/2023
1.0.3 417 10/31/2023
1.0.2 356 10/31/2023
1.0.1 373 10/30/2023
1.0.0 325 10/30/2023