Manual for Module “CMDB”

Warning

This article is under construction! Please DO NOT refer to any of the instructions below, yet! You may cause damage to your system! This article will be finished soon.

In this article:

SCCM Transfer

The SCCM transfer module is basically a collection of SQL queries which are executed and delivered to SCCM. This way, customers can fully change the behaviour to their needs. In general SCCM transfer can be configured in two different modes:

  1. Single computer transfer (used by form action button)
  2. Multiple computer transfer (used by list action button)

You will find the configuration for SCCM trensfer in “Settings->CMDB”.

Function Description
Description (de/en) Info text displayed in the pop-up.
List query Query which builds up the dropdown list in the pop-up.
Computer query

Selects mandatory data for computer import. It is important to stick to the correct order of the selected attributes:

  1. = Unique ID of computer element in SIM database
  2. = Target computer name
  3. = MAC Address
  4. = SMBIOS GUID (if available the computer will be created with SMBIOSGUID rather that MAC Address)

Available variables:

  • “{0}” = Selected (computer) item database IDs in the popup.
  • “{roles}” = Roles the user is currently in.
  • “{user}” = Username of the user currently logged in (DOMAINUsername).
  • “{id}” = ID of the CMDB item. Note: Only available when opened via action button.
  • “{param}” = Additional parameters defined in the view. Note: Only available when opened via action button.
Variable query

Variables added to the created SCCM computer object. It is important to stick to the correct order of the selected attributes:

  1. = Name of the computervariable
  2. = Value of the computervariable
  3. = Locale of the computervariable (if unknown please use ‘1031’)

Available variables:

  • “{0}” = SIM DB ID of the transferred computer object.
  • “{param}” = Parameter string given by the corresponding action button parameter.

Special variable prefixes:

  • “ConfigMgrColl” = If the variable has this prefix, a direct membership will be created for the collection name.
  • “ConfigMgrPrimaryUser” = If the variable has this prefix, a primary user relationship will be created (DOMAIN\Username notation).
Software query Variable SCCM package list created at runtime and added as variables to the computer object.
Application query Variable SCCM application list created at runtime and added as variables to the computer object.
Computer update

SQL script which is executed for every transfered computer with import result. Available variables:

  • “{0}” = SIM DB ID of the transfered computer object.
  • “{1}” = Message of the result. If successful the message is empty.
Site Target SCCM site object (Settings->Sites).
Configuration Computer configuration (variables, collections) which is the base for the creation of a new computer object.

Single Computer Transfer Example

Exchange the following XML with the corresponding elements in your configuration.xml:

<cmdb2sccm_compConfiguration>MassImportDummy</cmdb2sccm_compConfiguration>
<cmdb2sccm_compFilterName lang="de">Bitte wählen Sie eine Rollout Einheit zum Transfer nach SCCM</cmdb2sccm_compFilterName>
<cmdb2sccm_compFilterName lang="en">Please select rollout unit für transfer to sccm</cmdb2sccm_compFilterName>
<cmdb2sccm_compFilterList>SELECT 0 as Id, 'Single Computer Import' as SysDisplayName</cmdb2sccm_compFilterList>
<cmdb2sccm_compQuery>SELECT Id, SysDisplayName, MACAddress FROM Computers Where Id = {id}</cmdb2sccm_compQuery>
<cmdb2sccm_softQuery>Declare @ComputerId as bigint
set @ComputerId =  {0}

select distinct t.PkgId from (

select PackagingLanguages.SCCMLanguagePackPackageId as PkgId

FROM Computers 
JOIN PackagingLanguages ON PackagingLanguages.Id = Computers.Language
 
WHERE Computers.Id = @ComputerId

) as t

where isnull(t.PkgId,'') &lt;&gt; ''</cmdb2sccm_softQuery>
    <cmdb2sccm_appQuery>Declare @ComputerId as bigint
set @ComputerId =  {0}

select distinct t.AppTitle from (

select PackagingLanguages.SCCMAdditionalApplication as AppTitle

FROM Computers 
JOIN PackagingLanguages ON PackagingLanguages.Id = Computers.Language
 
WHERE Computers.Id = @ComputerId

) as t

where isnull(t.AppTitle,'') &lt;&gt; ''</cmdb2sccm_appQuery>
<cmdb2sccm_varQuery>Declare @ComputerId as bigint
set @ComputerId =  {0}

select 
'Language' as name
,PackagingLanguages.CodeISO6391 as value
,'1031' as locale

FROM Computers 
JOIN PackagingLanguages ON PackagingLanguages.Id = Computers.Language
 
WHERE Computers.Id = @ComputerId

UNION ALL

select 
'ConfigMgrPrimaryUser01' as Name
,'SCCM12\TestUser1' as value
,'1031' as locale

UNION ALL

select 
'ConfigMgrColl01' as Name
,'AdditionalOSDCollection' as value
,'1031' as locale</cmdb2sccm_varQuery>
<cmdb2sccm_compUpdate>select 0</cmdb2sccm_compUpdate>

Warning

After import, make sure you have “Site” and “Configuration” configured correctly in Settings -> CMDB.

Multiple Computer Transfer Example

Content will be published soon.