Gets a monitoring connector subscription by using the specified name. Namespace: Microsoft.EnterpriseManagement.ConnectorFramework
Assembly: Microsoft.EnterpriseManagement.OperationsManager (in microsoft.enterprisemanagement.operationsmanager.dll)


Visual Basic
Dim instance As ConnectorFrameworkAdministration
Dim name As String
Dim returnValue As MonitoringConnectorSubscription

returnValue = instance.GetConnectorSubscription(name)


Visual Basic
Public Function GetConnectorSubscription ( _
		name As String _
) As MonitoringConnectorSubscription
public MonitoringConnectorSubscription GetConnectorSubscription (
		string name
MonitoringConnectorSubscription^ GetConnectorSubscription (
		String^ name
public MonitoringConnectorSubscription GetConnectorSubscription (
		String name
public function GetConnectorSubscription (
		name : String
) : MonitoringConnectorSubscription



The name of the MonitoringConnectorSubscription to get.

Return Value

The MonitoringConnectorSubscription object that is identified by name.


C#  Copy Code
using System;
using System.Collections.ObjectModel;
using System.Text;
using Microsoft.EnterpriseManagement;
using Microsoft.EnterpriseManagement.Monitoring;
using Microsoft.EnterpriseManagement.ConnectorFramework;
using Microsoft.EnterpriseManagement.Common;
using Microsoft.EnterpriseManagement.Configuration;

namespace ConnectorSample
	class Program
		static void Main(string[] args)
			// Connect to a management group.
			ManagementGroup mgmtGroup = new ManagementGroup("localhost");
			// Get a reference to the connector framework administration object.
			ConnectorFrameworkAdministration cfAdmin = mgmtGroup.GetConnectorFrameworkAdministration();
			// Retrieve all subscriptions
			ReadOnlyCollection<MonitoringConnectorSubscription> subscriptions = cfAdmin.GetConnectorSubscriptions();
			MonitoringConnectorSubscription sub = subscriptions[0];
			// Retrieve a specific subscription
			MonitoringConnectorSubscription subscription = cfAdmin.GetConnectorSubscription(subscriptions[0].Name);
			Console.WriteLine("  DisplayName:	 " + subscription.DisplayName);
			Console.WriteLine("  Description:	 " + subscription.Description);
			Console.WriteLine("  Id:			" + subscription.Id);
			Console.WriteLine("  Name:			" + subscription.Name);
			Console.WriteLine("  ManagementGroup: " + subscription.ManagementGroup);


A monitoring connector subscription defines the criteria that are used to identify alerts that should be marked for a particular monitoring connector.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Development Platforms

Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP

Target Platforms

Windows Server 2008,Windows Server 2003,Windows Vista,Windows XP

See Also