Invoke-LMDiagnosticSource
Syntax
Section titled “Syntax”Id-diagnosticId (Default)
Section titled “Id-diagnosticId (Default)”Invoke-LMDiagnosticSource -Id <Int32> -DiagnosticId <Int32> [-AlertId <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Id-diagnosticName
Section titled “Id-diagnosticName”Invoke-LMDiagnosticSource -Id <Int32> -DiagnosticName <String> [-AlertId <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Name-diagnosticName
Section titled “Name-diagnosticName”Invoke-LMDiagnosticSource -Name <String> -DiagnosticName <String> [-AlertId <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Name-diagnosticId
Section titled “Name-diagnosticId”Invoke-LMDiagnosticSource -Name <String> -DiagnosticId <Int32> [-AlertId <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]DisplayName-diagnosticName
Section titled “DisplayName-diagnosticName”Invoke-LMDiagnosticSource -DisplayName <String> -DiagnosticName <String> [-AlertId <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]DisplayName-diagnosticId
Section titled “DisplayName-diagnosticId”Invoke-LMDiagnosticSource -DisplayName <String> -DiagnosticId <Int32> [-AlertId <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”The Invoke-LMDiagnosticSource function manually triggers a diagnostic source execution for a LogicMonitor host. The host can be identified by ID, name, or display name, and the diagnostic source can be identified by ID or name.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Invoke-LMDiagnosticSource -Id 123 -DiagnosticId 456Triggers diagnostic source ID 456 on host ID 123.
Example 2
Section titled “Example 2”Invoke-LMDiagnosticSource -HostName "server01" -DiagnosticName "Disk Troubleshooter" -AlertId "A123456"Looks up host and diagnostic source by name, then triggers a diagnostic execution associated with alert A123456.
Parameters
Section titled “Parameters”The host ID to run the diagnostic source against. Alias: HostId.
Type: Int32Parameter Sets: Id-diagnosticId, Id-diagnosticNameAliases: HostId, DeviceId
Required: TruePosition: NamedDefault value: 0Accept pipeline input: True (ByPropertyName)Accept wildcard characters: FalseThe host name to run the diagnostic source against. Alias: HostName.
Type: StringParameter Sets: Name-diagnosticName, Name-diagnosticIdAliases: HostName, DeviceName
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DisplayName
Section titled “-DisplayName”The host display name to run the diagnostic source against.
Type: StringParameter Sets: DisplayName-diagnosticName, DisplayName-diagnosticIdAliases: HostDisplayName, DeviceDisplayName
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DiagnosticId
Section titled “-DiagnosticId”The diagnostic source ID to execute.
Type: Int32Parameter Sets: Id-diagnosticId, Name-diagnosticId, DisplayName-diagnosticIdAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False-DiagnosticName
Section titled “-DiagnosticName”The diagnostic source name to execute.
Type: StringParameter Sets: Id-diagnosticName, Name-diagnosticName, DisplayName-diagnosticNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-AlertId
Section titled “-AlertId”Optional alert ID associated with this diagnostic execution.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Section titled “Inputs”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”Returns LogicMonitor.DiagnosticSourceExecution object.
Section titled “Returns LogicMonitor.DiagnosticSourceExecution object.”You must run Connect-LMAccount before running this command.