In my next series of posts, I will be talking about extending the Configuration Manager (Current Branch) console. This is a topic I am just starting to dig into myself, so follow along and we can learn together.
You are going to want to have a couple things available to you to follow along with these posts. The first and most obvious is a Configuration Manager environment. Particularly a console. You will also need Visual Studio. You can download the FREE community version here. Start this now. It takes a long time to install.
So what do I mean when I say “extending the console”? I am referring to adding functionality to the console to meet a specific need or solve a specific problem.
Most folks who work with Configuration Manager already know that the console is extensible. Who hasn’t used or heard of “Right Click Tools”? Many of us also already know that these are created through the use of XML files which makes up the look and feel of the Configuration Manager console, and scripts to perform these actions. What a lot of us don’t know, is HOW? “One thing I know for sure, is that these really cool scripts get copied into these folders somewhere and I get new right click menu options.” Well as it turns out, there is a bit more to it than that. It also seems we can customize quite a bit more than just “right click” options. In this post though, we are going to review what some of these customization capabilities are, and how to start digging in and understanding how to customize the Configuration Manager console.
So where do we begin? There are a lot of great posts out there explaining how to create console extensions. My goal isn’t so much to show you how to create the extensions, though we will cover some custom Actions; it is more about helping you understand all of the different possibilities available to us around customizing or extending the Configuration Manager console. Let’s review some basics about the Configuration Manager console:
- The console has a familiar Microsoft look and feel with the ribbon bar matching the content in the context menus. (Similar to Office.) Context menus are “pop up” or “right click” menus.
- The console has 4 sections. These “sections” are referred to as “nodes”.
- Assets and Compliance
- Software Library
- By default the console is installed to: “%ProgramFiles%\Microsoft Configuration Manager\AdminConsole”.
- When you install the console on the Primary Site Server, it get installed to: “[Configuration_Manager_Install_Directory]\Console“. (This value is stored in an environmental variable named SMS_ADMIN_UI_PATH.)
- The install directory contains a directory named “XmlStorage” that contains all of the XML files related to the console. (I like XML files. I can work with XML files.)
Now that we have gone over a few basic details about the console, lets get into some of the more advanced information. Lets start with MSDN. Here is a wealth of knowledge about the inner workings of the Configuration Manager console: https://msdn.microsoft.com/en-us/library/hh948631.aspx
This page specifically contains details about “Configuration Manager Console Extensions”.
Content in block quote is from MSDN:
The console has an XML-based architecture that can be easily extended. The Configuration Manager console supports the following extensions:
An action is a task or command accessed through either a context menu or the ribbon. A number of standard actions are available, and you can extend them to add new functionality, such as displaying a dialog box or launching an application.
You can extend the Configuration Manager console with dialog boxes or property sheets. You can also add new property pages to existing Configuration Manager console property sheets, such as the properties dialog for an object.
You can add new nodes to the Configuration Manager console.
You can create new views that are displayed in the result pane. You can also create new home pages. For example, you might want to add a new home page that is associated with a new navigation node that you have created.
You can integrate your own custom wizards into the Configuration Manager console by using a wizard framework of your choice.
Actions and Forms are what we commonly see in things like the “Right Click Tools” and/or other 3rd party extensions that are available. I have yet to personally use any custom Nodes, Views, or Wizards. Though its pretty amazing to know that those capabilities even exist. MDT integration might actually utilizes the Wizards. I know it uses Actions and maybe Forms.
We also have Management Classes. I got pretty excited when I came across this because I am a big fan of WMI. Not particularly writing my own classes or anything, just utilizing it.
You can define your own custom classes that can be used by your Configuration Manager console extension. For more information, see Configuration Manager Console Management Classes.
There is also a list of unsupported features as well. So for those of you who wanted to change the color of the console, sorry. No can do.
You cannot create wizards by using the existing Configuration Manager console framework. You also cannot modify or remove steps from the existing Configuration Manager wizards.
Modification of Core Configuration Manager Console Items
Do not change or remove items in the core Configuration Manager console XML, because this could break the Configuration Manager console. The core XML is stored in %ProgramFiles%\Microsoft Configuration Manager\AdminConsole\XmlStorage\ConsoleRoot.
SMS 2003 IMMF Interfaces
The Configuration Manager console is built by using managed code and does not support the SMS 2003 IMMF interfaces.
Registry-based extensions, similar to those available in SMS 2003, are not supported in the Configuration Manager console.
Microsoft Management Console SDK Extensions
Extensions written with the Microsoft Management Console SDK are not supported by the Configuration Manager console.
Below is a description of the console architecture provided by Microsoft. Three of those 4 are methods by which we can extend the capabilities of the Configuration Manager console. As I am not a developer, I will be staying away from the SDK for now at least, and focusing more on the XML extensibility. Again, I like XML.
Configuration Manager Console Extension ArchitectureThe System Center 2012 R2 Configuration Manager console architecture is built on the following four distinct layers.
- SMS Provider
- Managed SMS Provider SDK
- User interface framework
- Configuration Manager console XML
SMS Provider in Configuration Manager
The SMS Provider is essentially the same as the SMS 2007 Provider, with the addition of new classes that support new Configuration Manager features. You can access the SMS Provider through the usual WBEM interfaces, but for managed code you must use the managed SMS Provider SDK.
Managed SMS Provider SDK
The managed SMS Provider SDK provides a managed code library that abstracts the SMS Provider. It provides .NET Framework classes and interfaces that connect to the SMS Provider, make queries, and otherwise manipulate Configuration Manager objects and the site control file. You can use the managed SMS Provider SDK in stand-alone applications, or you can use the user interface framework to extend the existing Configuration Manager console.
User Interface Framework
The user interface framework lies on top of the managed SMS Provider SDK. The user interface framework provides functionality for dialog boxes and the Configuration Manager console, and it provides user interface validation within the Configuration Manager console. You can extend this user interface framework to add your own forms to the Configuration Manager console, or you can integrate your own forms within existing Configuration Manager console forms.
Configuration Manager Console XML
The Configuration Manager console XML defines how the Configuration Manager console looks and behaves. The XML defines nodes, queries, actions, forms, and everything else that is necessary to render the Configuration Manager console hierarchy, the results pane, and the action pane.The XML files that are used by the Configuration Manager console are stored under %ProgramFiles%\Microsoft Configuration Manager\AdminConsole\XmlStorage\.
The following table shows the subfolders:
Folder Description ConsoleRoot This folder contains various XML files that define built in user interface elements and classes.
ManagementClassDescriptions.xml: definitions for the SMS Provider classes.
ConnectedConsole.xml: definitions for sticky nodes and go-to navigation.
AssetManagementNode.xml, MonitoringNode.xml, SiteConfigurationNode.xml, SoftwareLibraryNode.xml: definitions for each workspace in the Configuration Manager console.
Extensions Location for XML that is related to the SMS Provider. There are four types of extension folders:
- Actions. XML files for Configuration Manager console actions. For more information, see Configuration Manager Console Actions.
- Forms. XML files for form extensions to the Configuration Manager console. For more information, see Configuration Manager Console Forms.
- Nodes. XML files for node extensions to the Configuration Manager console. For more information, see Configuration Manager Console Nodes
- Management Classes. XML files for management class extensions to the Configuration Manager console. For more information, see Configuration Manager Console Management Classes
Other Various helper XML files. Validation Validation rules for the Configuration Manager console forms.
Now lets take a look at the files in our AdminConsole\XmlStorage directory.
This is where a lot of the magic happens. This is where all of the XML files are stored that are used for modifying the look and feel of the console. The ConsoleRoot directory is especially interesting as it contains the existing details for our console. (More specifically: “built in user interface elements and classes”.) There are some particularly useful names and GUIDs that we will need later on located in these files as well. Below is a description of the files found in the ConsoleRoot directory. (As described in the table above.)
- ManagementClassDescriptions.xml: definitions for the SMS Provider classes.
- ConnectedConsole.xml: definitions for sticky nodes and go-to navigation.
- AssetManagementNode.xml, MonitoringNode.xml, SiteConfigurationNode.xml, SoftwareLibraryNode.xml: definitions for each work space in the Configuration Manager console.
The first file I want to briefly go over is the ManagementClassDescriptions.xml fle which, as described is: “definitions for the SMS Provider classes”. This is an interesting little file. This file contains all of the Configuration Manager related (SMS Provider) WMI classes and their definitions or descriptions. There are over 20,000 lines of XML in this file. That is a lot to take in. One of the reasons we want to use Visual Studio, is for the ability to collapse the XML nodes or outline. You can then expand it a piece at a time. This is a trick we will use again later on to help find unique IDs. (Note: You can do this in Notepad++ also, but it is not as clean looking or as easy.)
Open the ManagementClassDescriptions.xml file in Visual Studio. Open Visual Studio, and select “File > Open > File” and browse to your files. (You can make copies of these files to prevent accidental damage to any real content.) Once the file is open in Visual Studio, select “Edit > Outlining > Toggle All Outlining”. Everything should now be collapsed into 2 lines and should look like this:
Now expand the selection out twice and you will see the following:
You will notice that these are all of the WMI Classes related to the SMS Provider. Now expand one of the Class sections you will notice a “Properties” section. Expand that section as well and you will see all of the Properties associated to a specific Class.
Now this is definitely not the best method for searching through the SMS Provider WMI Classes and Properties by any means. I would recommend using “WMI Explorer” from Codplex for a simple view, or “WMI Explorer” from Sapien Technologies for a more advanced approach. It is good to know this is here though. This could be very useful later on down the line.
That is it for this post. In my next post we will start to go over some over the Extensions that we can create and try to create our own.