This example shows how to use the New-MgBetaDeviceManagementMonitoringAlertRule Cmdlet.
Parameters
-AdditionalProperties
Additional Parameters
Parameter properties
Type:
Hashtable
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AlertRuleTemplate
alertRuleTemplate
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BodyParameter
alertRule
To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
Parameter properties
Type:
IMicrosoftGraphDeviceManagementAlertRule
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Create
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Conditions
The conditions that determine when to send alerts.
For example, you can configure a condition to send an alert when provisioning fails for six or more Cloud PCs.
To construct, see NOTES section for CONDITIONS properties and create a hash table.
Parameter properties
Type:
IMicrosoftGraphDeviceManagementRuleCondition[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Description
The rule description.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DisplayName
The display name of the rule.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Enabled
The status of the rule that indicates whether the rule is enabled or disabled.
If true, the rule is enabled; otherwise, the rule is disabled.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Headers
Optional headers that will be added to the request.
Parameter properties
Type:
IDictionary
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Id
The unique identifier for an entity.
Read-only.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IsSystemRule
Indicates whether the rule is a system rule.
If true, the rule is a system rule; otherwise, the rule is a custom-defined rule and can be edited.
System rules are built in and only a few properties can be edited.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NotificationChannels
The notification channels of the rule selected by the user.
To construct, see NOTES section for NOTIFICATIONCHANNELS properties and create a hash table.
ruleThreshold
To construct, see NOTES section for THRESHOLD properties and create a hash table.
Parameter properties
Type:
IMicrosoftGraphDeviceManagementRuleThreshold
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
To create the parameters described below, construct a hash table containing the appropriate properties.
For information on hash tables, run Get-Help about_Hash_Tables.
[(Any) <Object>]: This indicates any property can be added to this object.
[Id <String>]: The unique identifier for an entity.
Read-only.
[AlertRuleTemplate <String>]: alertRuleTemplate
[Conditions <IMicrosoftGraphDeviceManagementRuleCondition- []>]: The conditions that determine when to send alerts.
For example, you can configure a condition to send an alert when provisioning fails for six or more Cloud PCs.
[Aggregation <String>]: aggregationType
[ConditionCategory <String>]: conditionCategory
[Operator <String>]: operatorType
[RelationshipType <String>]: relationshipType
[ThresholdValue <String>]: The threshold value of the alert condition.
The threshold value can be a number in string form or string like 'WestUS'.
[Description <String>]: The rule description.
[DisplayName <String>]: The display name of the rule.
[Enabled <Boolean?>]: The status of the rule that indicates whether the rule is enabled or disabled.
If true, the rule is enabled; otherwise, the rule is disabled.
[IsSystemRule <Boolean?>]: Indicates whether the rule is a system rule.
If true, the rule is a system rule; otherwise, the rule is a custom-defined rule and can be edited.
System rules are built in and only a few properties can be edited.
[NotificationChannels <IMicrosoftGraphDeviceManagementNotificationChannel- []>]: The notification channels of the rule selected by the user.
[NotificationReceivers <IMicrosoftGraphDeviceManagementNotificationReceiver- []>]: Information about the notification receivers, such as locale and contact information.
For example, en-us for locale and serena.davis@contoso.com for contact information.
[ContactInformation <String>]: The contact information about the notification receivers, such as an email address.
Currently, only email and portal notifications are supported.
For portal notifications, contactInformation can be left blank.
For email notifications, contactInformation consists of an email address such as serena.davis@contoso.com.
[Locale <String>]: Defines the language and format in which the notification will be sent.
Supported locale values are: en-us, cs-cz, de-de, es-es, fr-fr, hu-hu, it-it, ja-jp, ko-kr, nl-nl, pl-pl, pt-br, pt-pt, ru-ru, sv-se, tr-tr, zh-cn, zh-tw.
[(Any) <Object>]: This indicates any property can be added to this object.
[Aggregation <String>]: aggregationType
[Operator <String>]: operatorType
[Target <Int32?>]: The target threshold value.
CONDITIONS <IMicrosoftGraphDeviceManagementRuleCondition- []>: The conditions that determine when to send alerts.
For example, you can configure a condition to send an alert when provisioning fails for six or more Cloud PCs.
[Aggregation <String>]: aggregationType
[ConditionCategory <String>]: conditionCategory
[Operator <String>]: operatorType
[RelationshipType <String>]: relationshipType
[ThresholdValue <String>]: The threshold value of the alert condition.
The threshold value can be a number in string form or string like 'WestUS'.
NOTIFICATIONCHANNELS <IMicrosoftGraphDeviceManagementNotificationChannel- []>: The notification channels of the rule selected by the user.
[NotificationReceivers <IMicrosoftGraphDeviceManagementNotificationReceiver- []>]: Information about the notification receivers, such as locale and contact information.
For example, en-us for locale and serena.davis@contoso.com for contact information.
[ContactInformation <String>]: The contact information about the notification receivers, such as an email address.
Currently, only email and portal notifications are supported.
For portal notifications, contactInformation can be left blank.
For email notifications, contactInformation consists of an email address such as serena.davis@contoso.com.
[Locale <String>]: Defines the language and format in which the notification will be sent.
Supported locale values are: en-us, cs-cz, de-de, es-es, fr-fr, hu-hu, it-it, ja-jp, ko-kr, nl-nl, pl-pl, pt-br, pt-pt, ru-ru, sv-se, tr-tr, zh-cn, zh-tw.