Create SCSM Blackberry connector with Orchestrator

August 12, 2012 at 9:36 pm in Service Manager by kurtvh

Hello,

Mobile devices get automatically synchronized once you have SCCM 2012 configured to manage the mobile device (you have an Exchange server connection for gathering the mobile device info) and configured the Service Manager configMgr connector.

If that functionality is not available yet and you need to have a solution to get this information in your CMDB of Service Manager maybe this is a solution for you. In this blog I describe a solution to get Blackberry mobile device information from the Blackberry database and import this information in Service Manager CMDB. Orchestrator runbook approach is used to get and import the information.

Overview of the runbook in Orchestrator:

image

(simplified runbook to make it working. Additional steps/checks/manipulations can be integrated to accomplish your goals)

Integration packs used in this example:

  • SC 2012 Service Manager IP
  • Data Manipulation IP
  • Monitoring – default IP
  • Utilities – default IP

Note: In this example the Mobile device (SCCM) is used to import the Blackberry mobile devices. You can also create your own class that is based on the Mobile device class in Service Manager and import the information to that class.

Query for Blackberry information

Different possibilities are there to accomplish this task. One approach is more or less explained in this blog. Via PowerShell, csv file and import of the file. This blog explains the Orchestrator approach, simplified…flexible…and controllable.

First you can use the Schedule Date/Time activity to regularly run the runbook.

The Query database activity is used to query the Blackberry database. Configure this activity with the SQL connection to you Blackberry database.

image

On the details tab of this activity configuration the SQL query can be specified. The following SQL query is an example query to gather the information from the Blackberry database. Note: The Runbook action account will need to have the right to query the database, make sure you have configured this.

use BESMgmt
select
displayname as "Display Name", phonenumber as "Phone Number", PIN,IMEI as IMEI, modelname as BBModel, PlatformVer as "Platform", BootromVersion , ITPolicyName, AppsVer as "AppsVer", HomeNetwork as "Home Network"
 
from syncdevicemgmtsummary a
inner join
userconfig b
on a.userconfigid=b.id

Additional fields can be selected to your needs. Check the Blackberry database, the tables included in this query include a rich set of information that can be selected in your query.

image

The information gathered in this query is returned in a single line of information per discovered device.

Displayname;phonenumber;PIN;IMEI;modelname,PlatformVer;BootromVersion;ITPolicyName;AppsVer;HomeNetwork

Before we can use this information it must be split in single string values. For this task we can use the Data Manipulation Integration pack from Codeplex (URL). This IP includes an activity to split fields based on a character that you can specify. We have “;” separated file as output, so all information is there to configure this activity.

Input string for the split is the output of the query Blackberry database activity:

image

Full configuration of the split fields activity:

image

Result of this manipulation is that you can create a little overview of the mapping of information towards Service Manager. An example of a property mapping:

image

(default Mobile Device (SCCM) class properties)

Working with the Blackberry information

The information is gathered from the database and manipulated in a formation so we can use it to import that information in Service Manager. We have to make sure that new devices get created and existing devices get updated. The “Get Mobile device Object” activity is looking in Service Manager and based on the results of this query we can see if the mobile device needs to be updated or created.

image

The selection to see if I need an update or a create is in the link filter. We can check on the returned objects from the “Get”. No objects returned, this must be a new mobile device…normally one object returned if the device already exists and we can do an update.

image

image

Update the mobile device object in Service Manager

There are different option on this level. You can do several checks with the Compare activity from Orchestrator or simply update a predefined set of properties. In this example we update a set of properties during each runtime of the runbook. I recommend that you have made the mapping what information is stored in what field before starting to configure the update object activity.

Use the “Update Object” activity from the Service Manager IP:

Class: Mobile device (SCCM)

Object Guid: SC Object Guid  –> output of the Get Mobile device Object activity.

Fields: Select the fields that you want to update…

image

Overview activity configuration

image

Create new Mobile device (SCCM)

In the runbook there is an additional check included to verify the IMEI information. This because it is used as input for the ID of the Mobile device object to create.

Once the IMEI number is verified (the information is filled by the query) the Mobile device object can be created. In the explanation of the split activity an example overview of the property mapping is provided. This is used as input for the configuration of this activity.

Use the Update Object from the Service Manager IP:

Class: Mobile device (SCCM)

Fields: Select the fields that you want to update…

image

and map these fields to the output of the split activity…

image 

That’s’ about it…CI’s get created and updated on the schedule you have provided on the runbook.

Many variants of configurations are possible, all depending on what information that you want to have in your CMDB. Simply replace the Query to a datasource of your needs, get the information and import the data in your CMDB. All manipulations or check can be done by your runbook before actually importing or updating the CI in Service Manager.

Have fun,

Kurt Van Hoecke

 

Digg thisTweet about this on TwitterShare on LinkedInShare on Facebook