The RTM version of Service Manager Authoring Tool is released! The new versions allows you to do some new things that we did direct in XML before. In this blog post I will show you how you can create a new CI class, add a custom form to work with your class and also seal your management pack. The first thing you need to do is install the RTM version of the Authoring Tool. You can download it here.
In this example we will build a custom CI class named contoso. The first part will create a new CI class named Contoso.Projector.Library, we will then add a couple of properties that describes a projector.
- Start Service Manager Authoring Tool (v 7.0.5826.620)
- Click “Create a new Management Pack”
- Input Contoso.Projector.Library as file name, click save
- Select the top node in the management pack explorer, in the details pane, input “Management Pack that extends the CMDB with a projector class.” as description
- In the management pack explorer, right-click Classes and select “Create Configuration Item Class…”
- In the create class window, input Contoso.Projector and click Create
- Change the class name and description if needed
- Click “Create Property”
- In the create property window, input for example “Resolution”. Repeat step 9 for each of the following properties
- Select the Name property and change Key to TRUE. This means that the Name property will be the single property identifying a unique instance of the projector class.
- Select the automatically added property named Property_X. Delete it.
- When you select a property you can change details in the details pane. Change the data type for your properties, for example change WarrantyEnd and Purchase to data type Date Time. That means that the data should be in date format.
- Change some of the names to a better display string for example
- Purchase, Purchase date
- Number, Serial Number
- WarrantyEnd, Warranty End
- Monthly, Monthly Price
- Change Name to minimum length 2. You need to input at least two letters
That should do it; the class for projectors is done. Next step is to create a form that we can use to add projectors in the service manager console.
- In management pack explorer, right-click Forms and select Create
- In the base class window, select Contoso.Projector
- In the create form window, input contoso.projector.form
- Drag and drop a label for each property from the form customization toolbox to the form design window
- Drag and drop a text box for each property where the user will input text strings
- Drag and drop a date picker for the purchase date and warranty end date properties
- In the detail pane you can change the font and text size for any text
- The next step is to bind each text box to a property of your project class. Select a text box, for example Name and click binding path in the details pane.
- In the Binding Path window, select Name
- Repeat step 9 for each text box and date picker
That should do it! You now have a management pack with a new class and a form that we can use to create CIs for the new class.
We should seal the management pack before we import it. That would give us a couple of benefits, for example we can store views and folders in another management pack and access objects related to our projects management pack. We can’t create views and folders in the current version of the authoring tool so good practices could be to save them in another unsealed management pack and all core things in a sealed library management pack.
Next step is to seal the management pack. To seal the MP we will use .NET framework strong name utility (sn.exe).
- Open a command prompt
- Navigate to the folder where SN.EXE is located, in my case C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\bin\.
- Run SN –k mykey.snk
- Verify that a new key pair was generated, for example a mykey.snk file
- Switch to the Authoring Tool again
- In the management pack explorer, right-click the top node, in my example Contoso.Projector.Library and select “Seal Management Pack”
- In the Seal Management Pack window, select a suitable Output Folder, for example C:\MPs
- Browse and select your key file that you generated in step 3
- Input a company name, for example Contoso
- Click Seal
- Verify that seal succeeded, click Close
Now, import your management pack into Service Manager. Remember to import the management pack from C:\MPs, your sealed version. To create and view projectors you need to create a folder and a view
- In the service manager console, go to the Configuration Items workspace
- In the tasks pane, click Create Folder
- In create new folder window, input Projectors as Folder Name. Create a new management pack named Contoso.projector.config and store the folder in it. We can’t store the folder in your Contoso.projector.library management pack as it is now sealed.
- Select your new Projectors folder and select Create View
- In the create view window, input “All projectors” and view name. In the Criteria tab select Contoso.Projector as class. Click OK to save the view.
- Select your new “All projects” view. Create “create contoso.projector” from the tasks pane. Contoso.Projector is the name of the class we created in the authoring tool.
- In the projector form, fill in the text fields and click OK
Now you have a new class in your CMDB, you can store information about projectors. You can use your new form to input the information and your new view to review it.
Hi, I have never seen a limit of number of attributes you can create on a CI class.
Great article, thanks. Is there any documentation on the number of attributes you can create per CI?
[…] How to create a new CI class and a new form […]
[…] How to create a new CI class and a new form […]
[…] In Service Manager disks will show up as CI if you have a connect to Operations Manager. But default properties of the disk class was not enough, we needed to store information about disk IOPS and didn’t wanted to affect anything else, so we created a new configure item class, that would only be used for this purpose. The new class was created with Service Manager authoring tool, example here. […]
thanks for this great tutorial….
Hi, thanks for Reading my blog. I will try to do that. Sometimes I focus on getting the idea out, and not including all step by steps. Please let me know if there are some scenarios you want me to cover in detail and I will try to do that.
I do agree with all of the ideas you have presented in your post. They are really convincing and will certainly work. Still, the posts are too short for starters. Could you please extend them a bit from next time? Thanks for the post
Hello, I’ve allready created the custom management pack with the custom class.
Now I try to add a custom form to it, but when I right click ‘Forms’ in the ‘Management Pack Explorer’, I don’t get to see ‘Create’. What am I missing?
sorry to ask here, I could not find a more suitable article.
I have two ‘ListPicker’ controls on my own WPF-form. How could I make it so that after user changes ‘SelectedValue’ property of one of these controls a corresponding property of a second control would also change?
Thanks a lot
[…] How to create a new CI class and a new form (New) […]
Hi, you dont need to install visual studio at all when using the authoring tool.
Hisann Anders, gjøre du vet nå vi kan bruker Service Manager Authoring Tool med Visual Studio 2010??? Fordi jeg ikke ønsker til å ha til installere Visual Studio 2008!!
Great job! What I was looking for.
[…] this post I showed you how to create a custom CI class, a form and seal the management pack. If you want to […]
[…] This post was mentioned on Twitter by FAQShop and FAQShop, Maarten Goet. Maarten Goet said: Zelf formulieren bouwen in #SvcMgr? Volg de stappen op de blog van mijn goede MVP vriend Anders: http://ow.ly/2qzUH of bel @inovativ_nl 🙂 […]