Mapping SCCM Fields
•Example 4: Mapping Type AssetIdentifier to Serial Number
About SCCM Field Mapping
The asset identifiers and their mapped fields are stored in the Asset Data Mapping workspace. This workspace controls how incoming asset data gets processed by the asset processor and to which business object this data is mapped.
1.Log into the Service Manager Application.
2.Open the Asset Data Mapping workspace. A list of business objects defined for the configuration item appears.
3.Double-click the configuration item business object to which to map the SCCM field, such as CI.Workstation. The Asset Data Mapping page appears.
4.Select the Field Mappings tab. The list of asset identity or property appears on the SCCM Configuration Field Mapping page and on the corresponding field name on the asset data mapping record.
Asset Data Mapping Example
Example 1: Mapping CI Type
The SCCM row for Computer_System_Data.Roles0 contains the data:
LM_Workstation, LM_Server, SQLServer, Backup_Domain_Controller, Timesource, Print, NT, Backup_Browser, Master_Browser, DFS
The mapping is defined in pairs, except the last value.
Value | Paired With |
---|---|
LM_Server | Server |
Server_NT | Server |
SQLServer | Server |
LM_Workstation | Workstation |
Workstation | If no match, uses this default value |
Field Mapping Example - Configuration Items
The first match of the Value column above is mapped to the value in the Paired With column and is saved as the CI.Type.
In this example, the CI.Type is "Server" since there is a match in the Roles0 value for "LM_Server".
If role = LM_Workstation, returns Workstation.
If role = SQLServer, returns Server.
If role is not defined or does not exist, the default value is Workstation.
Example 2: Mapping CI Type
The SCCM row for Computer_System_Data.Roles0 contains the following data:
LM_Workstation, LM_Server, SQLServer, Backup_Domain_Controller, Timesource, Print, NT, Backup_Browser, Master_Browser, DFS
The SCCM row for Computer_System_Data.Model0 contains the Virtual Model Regex pattern data.
The mappings are defined as shown.
Value | Paired With |
---|---|
LM_Server | Server |
Server_NT | Server |
SQLServer | Server |
LM_Workstation | Workstation |
CIType2 Field Mapping Example - Configuration Items
The first match of the Value column above is mapped to the value in the Paired With column and is saved as the CI.Type.
If the Model Regex pattern matches the Model0 value, the application prepends the word "Virtual" to the previously identified CIType. Therefore, if a pattern match occurs for LM_Server, then the final CIType is VirtualServer.
If role = LM_Workstation, the CIType match is Workstation.
If role = SQLServer, the CIType match is Server.
If role is not defined or does not exist, the default value assigned is the last defined CIType, in this case, Workstation.
Example 3: Switch Function
The switch structure is built on the usual switch/case statement structure. The last entry acts as default.
Pseudo Code Example
switch (VirtualMachineType)
case '1': ExecutionEnvironment = Physical
case '2': ExecutionEnvironment = VMWare
case '3': ExecutionEnvironment = Virtual
1.In the SCCM tool, add a switch by selecting the + icon.
2.At the initial drop-down list, select database fields to map the source and target in the drop-down lists.
3.Add switch case information for as many items as needed, as shown below. For example 2:VMWare. If the mapping finds 2 in the Source database field, it enters VMWare within the database field selected in the target.
Field Mapping Example for Switch Function
Example 4: Mapping Type AssetIdentifier to Serial Number
Setting up a mapping from asset identifier type to serial number can be achieved by using the following method. The mapping type asset identifier works by creating a unique string as seen below, which should not be changed: SCCM-<first_8_hex_chars_of_machine_ID>-<rest_of_the_machine_ID_in_hex_chars>-<first_8_hex_chars_of_instance_key>-<rest_of_the_instance_key_in_hex_chars>.
In Discovery, the following criteria are used to match an asset to an existing configuration item in the order listed.
1.Client ID and fully qualified domain name (FQDN)
2.Host name (may not be fully qualified)
3.MAC address
Since serial number is not one of the fields that is used to match, the best way to set this up is to use the host name. This can be achieved by using one of the following two methods:
•Change the field mappings in the import so that the serial number is stored in the host name and vice versa. The issue with this method is that data is stored in fields that are not named correctly.
•Add a new field called NewName to the configuration item business object that has the same properties as the Name field. Add a new asset data mapping to each configuration item business object required to store the host name in this new field (such as Server, Virtual Server, Workstation, and so on.)
Now that a mapping exists to store the host name, change the asset data mapping to store the serial number in the Name field. The forms for the appropriate business objects should also be changed to display the data in the NewName field as the host name and the name data as the serial number.