Invoke-LMCollectorDebugCommand
Syntax
Section titled “Syntax”Id-Groovy
Section titled “Id-Groovy”Invoke-LMCollectorDebugCommand -Id <int> -GroovyCommand <string> [-CommandHostName <string>] [-CommandWildValue <string>] [-IncludeResult] [<CommonParameters>]Id-Posh
Section titled “Id-Posh”Invoke-LMCollectorDebugCommand -Id <int> -PoshCommand <string> [-CommandHostName <string>] [-CommandWildValue <string>] [-IncludeResult] [<CommonParameters>]Id-Debug
Section titled “Id-Debug”Invoke-LMCollectorDebugCommand -Id <int> -DebugCommand <string> [-CommandHostName <string>] [-CommandWildValue <string>] [-IncludeResult] [<CommonParameters>]Name-Groovy
Section titled “Name-Groovy”Invoke-LMCollectorDebugCommand -Name <string> -GroovyCommand <string> [-CommandHostName <string>] [-CommandWildValue <string>] [-IncludeResult] [<CommonParameters>]Name-Posh
Section titled “Name-Posh”Invoke-LMCollectorDebugCommand -Name <string> -PoshCommand <string> [-CommandHostName <string>] [-CommandWildValue <string>] [-IncludeResult] [<CommonParameters>]Name-Debug
Section titled “Name-Debug”Invoke-LMCollectorDebugCommand -Name <string> -DebugCommand <string> [-CommandHostName <string>] [-CommandWildValue <string>] [-IncludeResult] [<CommonParameters>]Description
Section titled “Description”The Invoke-LMCollectorDebugCommand function allows execution of debug, PowerShell, or Groovy commands on a specified LogicMonitor collector.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”#Execute a debug commandInvoke-LMCollectorDebugCommand -Id 123 -DebugCommand "!account" -IncludeResultEXAMPLE 2
Section titled “EXAMPLE 2”#Execute a PowerShell commandInvoke-LMCollectorDebugCommand -Name "Collector1" -PoshCommand "Get-Process"Parameters
Section titled “Parameters”-CommandHostName
Section titled “-CommandHostName”The hostname context for the command execution.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-CommandWildValue
Section titled “-CommandWildValue”The wild value context for the command execution.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DebugCommand
Section titled “-DebugCommand”The debug command to execute. Required for Debug parameter sets.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name-Debug Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Id-Debug Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-GroovyCommand
Section titled “-GroovyCommand”The Groovy command to execute. Required for Groovy parameter sets.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name-Groovy Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Id-Groovy Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''The ID of the collector. Required for Id parameter sets.
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: Id-Groovy Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Id-Posh Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Id-Debug Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-IncludeResult
Section titled “-IncludeResult”Switch to wait for and include command execution results.
Type: System.Management.Automation.SwitchParameterDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''The name of the collector. Required for Name parameter sets.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name-Groovy Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Name-Posh Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Name-Debug Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-PoshCommand
Section titled “-PoshCommand”The PowerShell command to execute. Required for Posh parameter sets.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name-Posh Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Id-Posh Position: Named IsRequired: true 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.