Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns an alert, if it is exists, for the specified feature and health definition that is defined on the network.
Namespace:   Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework
Assembly:  AlertFramework (in AlertFramework.dll)
Syntax
public Alert GetNetworkAlert(
    string featureName,
    string healthDefinitionName,
    string machineId
)
public:
Alert^ GetNetworkAlert(
    String^ featureName,
    String^ healthDefinitionName,
    String^ machineId
)
Public Function GetNetworkAlert (
    featureName As String,
    healthDefinitionName As String,
    machineId As String
) As Alert
Parameters
- featureName 
 Type: System.String- The name of the feature. 
- healthDefinitionName 
 Type: System.String- The name of the health definition 
- machineId 
 Type: System.String- The NetBIOS name of the network computer that raised the alert. 
Return Value
Type: Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework.Alert
An instance of Alert.
Exceptions
| Exception | Condition | 
|---|---|
| AlertProviderException | Communication or connection errors occurred when calling the Alert Provider. | 
Examples
The following code example shows how to get network alerts:
string featureName = "FeatureName";
string healthDefinitionName = "HealthDefinitionName";
string machineName = "MachineName"; 
NetworkAlertManager networkAlertManager = 
   new NetworkAlertManager();
Alert alert = networkAlertManager.GetNetworkAlert(
   featureName, healthDefinitionName, machineName);
Note
The FeatureName and the HealthDefinitionName are defined in the Definition.xml file for the add-in.
See Also
NetworkAlertManager Class
Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework Namespace
Return to top