New-LMActionRule
Syntax
Section titled “Syntax”__AllParameterSets
Section titled “__AllParameterSets”New-LMActionRule [-Name] <string> [-ActionChainId] <int> [-DeviceGroups] <string[]> [-LevelStr] <string> [[-Devices] <string[]>] [[-DataSource] <string>] [[-Instance] <string>] [[-DataPoint] <string>] [[-ResourceProperties] <hashtable>] [[-Enabled] <bool>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”The New-LMActionRule function creates a new action rule in LogicMonitor.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”New-LMActionRule -Name "Disk Rule" -ActionChainId 456 -DeviceGroups @("/Servers") -LevelStr "Critical"Parameters
Section titled “Parameters”-ActionChainId
Section titled “-ActionChainId”Specifies the ID of the action chain to use.
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 1 IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- cfParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DataPoint
Section titled “-DataPoint”Specifies the datapoint name to apply the rule to.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 7 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DataSource
Section titled “-DataSource”Specifies the datasource name to apply the rule to.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 5 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DeviceGroups
Section titled “-DeviceGroups”Specifies an array of device group full paths to apply the rule to.
Type: System.String[]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 2 IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Devices
Section titled “-Devices”Specifies an array of device display names to apply the rule to.
Type: System.String[]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 4 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Enabled
Section titled “-Enabled”Specifies whether the action rule is enabled after creation.
Type: System.BooleanDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 9 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Instance
Section titled “-Instance”Specifies the instance name to apply the rule to.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases:- DataSourceInstanceNameParameterSets:- Name: (All) Position: 6 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-LevelStr
Section titled “-LevelStr”Specifies the level string for the action rule. Valid values: “All”, “Critical”, “Error”, “Warning”.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 3 IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Specifies the name for the action rule.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 0 IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-ResourceProperties
Section titled “-ResourceProperties”Specifies resource properties to filter on.
Type: System.Collections.HashtableDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 8 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-WhatIf
Section titled “-WhatIf”Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- wiParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “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.