ConfigMgr Integration

This document details how to integrate your applications and services with Microsoft System Center Configuration Manager (ConfigMgr).

Introduction

Configuration Manager provides a comprehensive platform for managing Windows devices and applications. Integrating with ConfigMgr allows you to leverage its capabilities for deployment, compliance, and inventory management. This integration can be achieved through various methods, including the ConfigMgr SDK, PowerShell cmdlets, and WMI.

Integration Methods

1. Using the ConfigMgr SDK

The ConfigMgr SDK provides a programmatic interface for interacting with ConfigMgr. It allows you to develop custom solutions that can query information, create objects, and perform administrative tasks within ConfigMgr.

The SDK is typically accessed using COM objects and can be scripted using languages like VBScript, PowerShell, or C#.

2. PowerShell Cmdlets

Configuration Manager includes a rich set of PowerShell cmdlets that offer a powerful and flexible way to manage ConfigMgr. These cmdlets cover a wide range of operations, from querying collections to deploying applications.

To use these cmdlets, ensure you have the Configuration Manager console installed and the necessary permissions.


# Example: Get all collections
Get-CMCollection

# Example: Get details of a specific application
Get-CMApplication -Name "MyAwesomeApp"
            

3. Windows Management Instrumentation (WMI)

Configuration Manager exposes its functionality through WMI. This allows you to query ConfigMgr data and even trigger actions using standard WMI tools and programming interfaces.

The primary namespace for ConfigMgr WMI is root\SMS\site_.


' Example VBScript to query collection members
Set objSWbemServices = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\SMS\site_ABC")
Set colItems = objSWbemServices.ExecQuery("SELECT * FROM SMS_R_System WHERE ClientType=2")

For Each objItem In colItems
    Wscript.Echo objItem.Name
Next
            

Common Integration Scenarios

Best Practices

API Reference (Brief Overview)

Key WMI Classes

  • SMS_Collection: Represents a ConfigMgr collection.
  • SMS_Package: Represents a ConfigMgr package.
  • SMS_Application: Represents a ConfigMgr application.
  • SMS_SystemResource: Represents a discovered resource (computer).

Key PowerShell Cmdlets

  • Get-CMCollection
  • New-CMApplication
  • Invoke-CMRunPowerShellScript
  • Get-CMDevice

Further Reading