Snippet Guides

New Instance Group

Before you begin: Before creating a new group you need to decide on a group ID and a display name.

For more information, consult the MP Content document, section Group naming.

Group naming


If the project is not open in Visual Studio, open it.

Note: If there's no prior reference to the Microsoft.SystemCenter.InstanceGroup.Library management pack it must be added first. Right-click the References folder in the project and select Add reference. Browse to the management pack and select it. Verify that the alias is MSIL.


Add new folder
Right-click the project and choose Add\New folder. The name of the folder should be same as the description part of the Group ID. So if the full group ID is MyCompany.TestMP.3.0.ExportServicesGroup.Class, the folder would be named ExportServicesGroup.



Add new item
Right-click the new folder and choose Add\New Item....
In the list, select Empty Management Pack Fragment.



Enter fragment name
Enter a name for the fragment. This should be the same as the folder you created before. Click Add. The fragment is created and opened.


Choose snippet
Right-click between the <ManagementPackFragment> tags and select Insert snippet. Choose MPDevToolkit\Classes\Group. Select Instance Group.

The code is inserted.



Enter MPID and group name
Enter the MPID and press tab.
Enter the group description. This should be the same as the folder you just created.

Press tab.


Enter display name and description
Enter the group display name you decided on earlier. Press tab. Enter a short description of the group. Both the display name and description is shown in the Operations Console. Press tab.


Press enter to stop editing the snippet. The group has now been created.
Save the file/project.

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