New-LMActionChain
Syntax
Section titled “Syntax”Default (Default)
Section titled “Default (Default)”New-LMActionChain -Name <string> -Stages <psobject[]> [-Description <string>] [-WhatIf] [-Confirm] [<CommonParameters>]InputObject
Section titled “InputObject”New-LMActionChain -InputObject <psobject> [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”The New-LMActionChain function creates a new action chain in LogicMonitor. You can specify individual parameters or provide a complete configuration object using the InputObject parameter.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”New-LMActionChain -Name "Disk Chain" -Stages @( @{ id = 123; type = 'diagnosticSource' }, @{ id = 456; type = 'remediationSource' })EXAMPLE 2
Section titled “EXAMPLE 2”$config = @{ name = "Disk Chain" stages = @( @{ id = 123; type = 'diagnosticSource' } )}New-LMActionChain -InputObject $configParameters
Section titled “Parameters”-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: ''-Description
Section titled “-Description”The description for the action chain.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Default Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-InputObject
Section titled “-InputObject”A PSCustomObject containing the complete action chain configuration.
Type: System.Management.Automation.PSObjectDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: InputObject Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''The name of the action chain. Mandatory when using explicit parameters.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Default Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Stages
Section titled “-Stages”The ordered list of action chain stages. Each stage requires id and type (diagnosticSource or remediationSource).
Type: System.Management.Automation.PSObject[]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Default Position: Named IsRequired: true 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.