This is the sixth and last part of the blog series about my Asset Management solution for SCSM 2012 R2.
Part 1: General overview
Part 2: Authoring – Classes and Relationships
Part 3: Folders and Views
Part 4: Authoring – Forms
Part 5: Reports
This part of the series covers the runbooks which are created with System Center Orchestrator 2012 R2.
All Orchestrator Runbook servers need the following software and Integration Packs installed:
- Integration pack for System Center Service Manager 2012 R2
- Service Manager SDK (can be found on the SCSM Management Server in %ProgramFiles%\Microsoft System Center\Service Manager 2012\SDK Binaries)
- SMlets
Nearly all runbooks use the SCSMServer variable, which you need to set:
There are three main runbooks. All check the status of Windows Computers and create or update assets. All three inform site owners at the end through email. These activities also need adjustment as you need to enter the SMTP server information and email addresses.
You can read this blog to understand the dependency between the Windows Computer object and the Deployed Computer object from SCCM. There you also see that some information, which we need to create the asset, is in the Deployed Computer object (as the serial number).
1.Create assets:
This is the main runbook to create the computer assets. It checks if the asset for a deployed Windows Computer exists, if it exists, then it only checks the relationship and updates the asset. If it does not exist, then it gets the required information through the sub runbooks and then creates the asset and the necessary relationships.
2. Update assets:
This runbook only updates the location information, if the asset was re-imaged at a new site.
3. Check deleted:
This runbook only checks for deleted objects, but does not delete the asset, as it should stay in the database.
The following sub runbooks get additional information for the assets.
Get Location information:
This runbook checks if the list entries exist for the country and site and if they are new, then it creates the enum list entry.
This runbook in the “Get Location Info” activity checks a local text file, which has the site information in this format Shortname – Site – Country – Region. Example: FRA – Frankfurt – Germany – Europe. You can also query that information from a database if you have it there.
In the “Check Country/Site” activity it checks if the enum value exists and if not, then it creates it. You will need to check, if you have another GUID for your enum lists:
$SiteEnum=’9d07bd6a-9e08-439e-486c-4ba4e7f88b30′
Check Model/Manufacturer:
This runbook checks if the list entries exist for the model and manufacturer and if they are new, then it creates the enum list entry.
You will need to check, if you have another GUID for your enum lists:
Get Warranty information: Find detailed information in this post.
Create AssetToComputerAsset Relationship:
Create AssetCustodian Relationship:
Check Relationships:
Additionally we have this runbook, which checks the relationships for all classes to the AssetManagementBase class and creates them, if they do not exist.
These runbooks all only check the Windows Computer objects. If you have another source which you can use to create/update other asset object types, then you can create your own runbooks for it.
Have fun!