Skip to content

Invoke-LMDiagnosticSource

Terminal window
Invoke-LMDiagnosticSource -Id <Int32> -DiagnosticId <Int32> [-AlertId <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Terminal window
Invoke-LMDiagnosticSource -Id <Int32> -DiagnosticName <String> [-AlertId <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Terminal window
Invoke-LMDiagnosticSource -Name <String> -DiagnosticName <String> [-AlertId <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Terminal window
Invoke-LMDiagnosticSource -Name <String> -DiagnosticId <Int32> [-AlertId <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Terminal window
Invoke-LMDiagnosticSource -DisplayName <String> -DiagnosticName <String> [-AlertId <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Terminal window
Invoke-LMDiagnosticSource -DisplayName <String> -DiagnosticId <Int32> [-AlertId <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

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.

Terminal window
Invoke-LMDiagnosticSource -Id 123 -DiagnosticId 456

Triggers diagnostic source ID 456 on host ID 123.

Terminal window
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.

The host ID to run the diagnostic source against. Alias: HostId.

Type: Int32
Parameter Sets: Id-diagnosticId, Id-diagnosticName
Aliases: HostId, DeviceId
Required: True
Position: Named
Default value: 0
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

The host name to run the diagnostic source against. Alias: HostName.

Type: String
Parameter Sets: Name-diagnosticName, Name-diagnosticId
Aliases: HostName, DeviceName
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The host display name to run the diagnostic source against.

Type: String
Parameter Sets: DisplayName-diagnosticName, DisplayName-diagnosticId
Aliases: HostDisplayName, DeviceDisplayName
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The diagnostic source ID to execute.

Type: Int32
Parameter Sets: Id-diagnosticId, Name-diagnosticId, DisplayName-diagnosticId
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

The diagnostic source name to execute.

Type: String
Parameter Sets: Id-diagnosticName, Name-diagnosticName, DisplayName-diagnosticName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Optional alert ID associated with this diagnostic execution.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

None. You cannot pipe objects to this command.

Section titled “None. You cannot pipe objects to this command.”

Returns LogicMonitor.DiagnosticSourceExecution object.

Section titled “Returns LogicMonitor.DiagnosticSourceExecution object.”

You must run Connect-LMAccount before running this command.