Service Manager 2012 External User Import
Welcome everyone! Today’s blog is written by Manoj Kumar, our newest and most experienced team member in the world of System Center.
Service Manager 2012 External user Import in his words :)
One of the common scenarios that we come across for Service Manager 2012 is whether there’s a way to sync User CI data from SQL DB to Service Manager CMDB. Lets say a customer has user data in SQL and he wanted to import it to Service Manager on-demand. Or Sometimes you may want to bulk import Users CIs to Service Manager.
The simplest way to get users data into the Service Manager CMDB is out of the box feature, Active Directory connector but, there are cases like where someone wants to import external uses data to SM. This is just a reference/sample solution to give you an idea how you can achieve it. You can modify it based on your need and build the your logic around it.
One way to do this is to import them from console using a Comma-Separated Value (CSV) using creating CSV connectors on CodePlex site http://scsmcsvconnector.codeplex.com/
There are two ways here you can feed the data to SM 12 one, run PowerShell script manually or automate it using Orchestrator (SCOrch) (Download the sample scripts from here http://sdrv.ms/18eE7xX )
What is the CSV Import Feature? http://blogs.technet.com/b/servicemanager/archive/2009/05/26/using-the-csv-import-feature.aspx
The CSV Import Feature is a Service Manager component that allows users to bulk-import instances of any class type or projection type defined in the Service Manager Configuration Management Database (SMCMDB).
To import a set of instances using the CSV Import Feature, two files are required:
1. A data file that consists of a series of comma-delimited object instances. The data file must end with the ".csv" file extension.
2. A format file that specifies the class type or projection type of the instances present in the data file. Every instance in the data file is assumed to be of the this type. The format file must have the same file name as the CSV file that it describes, and it must end with the ".XML" file extension.
Automating the Process in SCSM 2012 using System Center 2012 Orchestrator (SCOrch)
Assuming you have data in SQL the way Service Manger can accept (based on usrers.xml file)
This is a sample Runbook to automated CSV import (shown in the figure below), performs the following steps: (you can download users.csv, users.xml and sample orchestrator Runbook from here http://sdrv.ms/18eE7xX )
1. SQL Import:
1. Brings the data from SQL table to C:\Import\User.csv. You need to have User.xml file in the same path.
2. 2. Feed the data to SCSM DB.
PowerShell Script read the c:\Import\Users.csv and c:\Users.xml file and feed the data to SCSM DB.
3. 3. This step will back-up(Move) your Users.csv file, so that you will have backup of last import done moreover, SQL import step will not override the Users.csv file.
Now you should be able to see external user data in Service Manager CMDB , this will allow you to create Tickets for Exported Users.
We hope this blog was informative .
Happy Reading :)
- A Team !