Skip to content

Test-LMAppliesToQuery

Terminal window
Test-LMAppliesToQuery [-Query] <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

The Test-LMAppliesToQuery function is used to test the applies to query against the LogicMonitor API.

Terminal window
Test-LMAppliesToQuery -Query "system.hostname == 'server01'"
This example tests the applies to query "system.hostname == 'server01'" against the LogicMonitor API and returns a list of matching devices.

The applies to query to be tested.

Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
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.

The Query parameter accepts string input that specifies the applies to query to test.

Section titled “The Query parameter accepts string input that specifies the applies to query to test.”

Returns an array of objects containing the devices that match the specified query criteria.

Section titled “Returns an array of objects containing the devices that match the specified query criteria.”

This function requires a valid LogicMonitor API authentication. The query syntax must follow LogicMonitor’s applies to query format.