Snippet Guides

New Management Pack

Before you begin: Before creating a new management pack you need to decide what type of management pack you are creating. You also need to come up with a management pack ID (MPID) and a dispay name.

For more information, consult the MP Content document, sections Management pack types and Management pack naming.

Management pack types
Management pack naming

To create a new management pack, start by launching Visual Studio.

New Project
Select File and then New\Project.

Select template
Then click Templates and Management Pack\Operations Manager. Select the correct version of Operations Manager and then enter a name for the project. This should be the MPID you decided on earlier. The solution name is updated automatically. Verify that the location is correct and that the check box "Create directory for solution" is checked. Click Ok. The project is created.

Click link
When the project is created, right click the project name in the solution explorer and select Properties. On the "Management Pack" tab, click Find or Create the Management Pack Display Name and Description link.
A new MP Fragment opens with a display string. Update the Name tag with the management pack display name you decided on earlier. Update the Description with a short description of the management pack. Below are some examples of descriptions:

This Management Pack will discover Microsoft SQL Server 2012.
Management pack to collect alerts for Advisor Analytics
This management pack monitors Windows Server 2012.

Pick one that makes it easy to understand the purpous of the management pack.

Add new folder
Right click the project name in the solution explorer and click Add\New Folder. Name the new folder "Scripts".

Add new item
Right click the project name again and select Add\New Item.... Select Empty Management Pack Fragment.

Set fragment name
Set the fragment name to RootFolder. Click Add. The fragment is added and opened.

Insert snippet
Right-click between the <ManagementPackFragment> tags and select Insert snippet. Choose MPDevToolkit\Presentation and select Folder. The snippet is inserted.

Enter MPID
Enter the MPID and press tab. Leave Root and just press tab again.

Enter folder name
Set the folder display name. This is shown in the Operations Console and is usually the same as the management pack display name. Enter a description of the folder. This could be "The root folder of the management pack". Press enter to stop editing the snippet.

Click Save all.

Version: 1.0
Created: 2016-05-23, 11:00