Test-LMAppliesToQuery
Syntax
Section titled “Syntax”Test-LMAppliesToQuery [-Query] <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”The Test-LMAppliesToQuery function is used to test the applies to query against the LogicMonitor API.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”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.Parameters
Section titled “Parameters”-Query
Section titled “-Query”The applies to query to be tested.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 1Default 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”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.”Outputs
Section titled “Outputs”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.