SCCM Plug-in

DBrowning
Valued Contributor II

Is there any kind of attribute mapping that can be used in the SCCM Plug-in v3.40? This is my first version installing and I know it no longer requires the piece installed on the JSS as in previous version. Any advice would be greatly appreciated.

4 REPLIES 4

drhoten
Contributor II

Hi Dennis -

Are you looking to bring over extension attributes from your JSS to SCCM?

If yes, then there is nothing which can do this by default. However, you may be able to modify the XSL files now located in C:Program Files (x86)JAMF SoftwareJSS SCCM Proxy Servicexsl.

Changing these files will allow you to alter what information is sent over for the hardware and software inventory reports for devices. If you check the comments in the file for computer hardware, there are examples of how you can map extension attributes to variables in the XSL file. The tricky part is knowing where in SCCM to map it to.

If you need more assistance, be sure to reach out to support and one of the integration specialists will be able to help you out.

Doug

DBrowning
Valued Contributor II

This is what I am getting from my SCCM guy trying to get things matched up:

"One Main classification’s missing is “Console usage” which is used to calculate the primary user of a system. We will definitely need to get this info synced up if its available in Casper.
Attributes that do link up, are also missing some important info which we need to resolve. For example, the Subnet Mask is missing from the network properties which is actually a very important attribute to collect."

I'll have him look at the xsl files you pointed out and see if that will help him with data hes looking for.

drhoten
Contributor II

There is an extension attribute for the JSS for the last logged in user, so the information can be made available to the proxy service. Do you know what field "Console Usage" is in either the WMI classes or the SQL Server database used by SCCM? If you know that, it may be possible if that information can be mapped using the hardware inventory.

If you reach out to your technical account manager, there is actually some additional information they can provide you which shows how the elements in the JSS API are mapped to both the WMI classes used by the SDK and the SQL Server tables the data ends up in.

The subnet is not currently being brought over, but it should be possible to do that using an extension attribute and modifying the XSL file for hardware inventory. Specifically, take a look at the IPSubnet attribute of the Win32_NetworkAdapterConfiguration WMI class.

alexjdale
Valued Contributor III

Here's my "Primary User" attribute I created a while back, based off of the data returned by the "ac -p" command. I am certain there is a better way to do it (my sort algorithm is lame), but this returns the person who has been using the system the most for as long as the wtmp file has been intact.

Edit: ok, this code is actually pretty embarrassing since it's my earliest bash work, but you get the gist.

#!/bin/bash

loggedReport=`ac -p`
locpos=2
primaryuser=`echo $loggedReport | awk '{print $1}'`
primarytime=`echo $loggedReport | awk '{print $2}'`

read_next_pair(){
locpos=`expr $locpos + 1`
currentuser=`echo $loggedReport | awk '{print $'$locpos'}'`
locpos=`expr $locpos + 1`
currenttime=`echo $loggedReport | awk '{print $'$locpos'}'`
# Bail out if something goes haywire and awk is returning null values - to avoid infinite loop
if [[ $currentuser = "" ]]; then
exit 1
fi
}

read_next_pair

# While loop to read in values and compare them one by one, keeping the one with the highest time logged in
while [[ $currentuser != total ]]; do
comparetimes=`echo $currenttime $primarytime | awk '{if ($1 > $2) print "True"; else print "False"}'`
if [[ $comparetimes = "True" ]]; then
    primaryuser=$currentuser
    primarytime=$currenttime
fi
read_next_pair
done

echo "<result>$primaryuser</result>"
exit 0