AIM

Image Handling – Part One: Branding

As mentioned in the previous blog, the management of Images continues. The next step is to collect the data about Images into the ConfigMgr database. This is a great way to keep track of the Images in production.

First up, we need to extend the inventory data in the Configuration.mof file before we can collect the information to ConfigMgr. The Configuration.mof file is located in the ConfigMgr install folder on the Primary site, in my case this is D:\ConfigMgr\inboxes\clifiles.src\hinv.

part-1

Figure 1 – Where to find the Configuration.mof file.

You have to edit the file with the extra configuration information for the Image registry keys, the following text below must be entered in between the opening and closing chapter “Added extensions start” and “Added extentions stop” and the text in pink is only necessary in ConfigMgr 2007 Environments (and then you have to configure the SMS_DEF.mof file aswell).

You really should test this out in a controlled environment before you “jump in to production”!

// Image iventory by Richard Ulfvin @ FileMilk
// 2012-11-13 01:40:45
#pragma namespace (\\\\.\\root\\cimv2)
#pragma deleteclass(“Image”, NOFAIL)
[DYNPROPS]
Class Image
{
[key] string KeyName;
String Description;
String InstallDate;
String InstallPath;
String OS;
String Release;
};

[DYNPROPS]
Instance of Image
{
KeyName=”RegKeyToMOF_32″;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\FileMilk\\
Image|Description”),Dynamic,Provider(“RegPropProv”)] Description;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\FileMilk\\
Image|InstallDate”),Dynamic,Provider(“RegPropProv”)] InstallDate;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\FileMilk\\
Image|InstallPath”),Dynamic,Provider(“RegPropProv”)] InstallPath;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\FileMilk\\
Image|OS”),Dynamic,Provider(“RegPropProv”)] OS;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\FileMilk\\
Image|Release”),Dynamic,Provider(“RegPropProv”)] Release;
};
#pragma namespace (\\\\.\\root\\cimv2)
#pragma deleteclass(“Image_64″, NOFAIL)
[DYNPROPS]
Class Image_64
{
[key] string KeyName;
String Description;
String InstallDate;
String InstallPath;
String OS;
String Release;
};
[DYNPROPS]
Instance of Image_64
{
KeyName=”RegKeyToMOF_64”;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\
FileMilk\\Image|Description”),Dynamic,Provider(“RegPropProv”)] Description;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\
FileMilk\\Image|InstallDate”),Dynamic,Provider(“RegPropProv”)] InstallDate;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\
FileMilk\\Image|InstallPath”),Dynamic,Provider(“RegPropProv”)] InstallPath;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\
FileMilk\\Image|OS”),Dynamic,Provider(“RegPropProv”)] OS;
[PropertyContext(“Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\
FileMilk\\Image|Release”),Dynamic,Provider(“RegPropProv”)] Release;
};

When you save the configuration file, the MOF compilation will take place on the site server. You should check the dataldr.log file for a successful result.

part-2

Figure 2 – LogFile presented to MofComp.

Next up, run the Machine Policy Retrieval & Evaluation Cycle and the Hardware Inventory Cycle on a computer that’s been branded by the ZTIImage.wsf script. Wait for the data to be populated in to the local WMI repository on the machine.

Then, navigate in the ConfigMgr console to Administation -> Client Settings -> Default Client Settings, right click and chose Properties. Go to Hardware settings and click on “Set Classes…”

part-3

Figure 3 – How to get to your hardware inventory classes.

In the lower right corner click the Add… button and then the Connect… button under the Add Hardware Inventory Class form that pops up.

Enter the name of the computer that has been branded with the ZTIImage.wsf script in the values box Computer name, then click on the Connect button.

part-4

Figure 4 – WMI Connection to the computer with the “Image” values.

Add the Image class to the inventory list.

part-5

Figure 5 – WMI Class of the Imagehandling.

The class will be added to the inventory data with all the values that is being branded.

part-6

Figure 6 – Values being populated in the Hardware Inventory

The information will then show up in Resource Explorer.

part-7

Figure 7 – Resource Explorer

In the final blogpost, we will look into how this information can be handy for managing your lifecycle of the desktop service.

Best regards,

Richard Ulfvin
Senior Consultant

Posted in Blog, Windows Server 2012 R2.