Skip to content

Build-LMFilter

Terminal window
Build-LMFilter [[-ResourcePath] <string>] [-PassThru] [<CommonParameters>]

The Build-LMFilter function creates a filter expression by interactively prompting for conditions and operators. It supports basic filtering for single fields and advanced filtering for property-based queries. Multiple conditions can be combined using AND/OR operators. When a ResourcePath is provided, the wizard validates field names and provides suggestions.

Terminal window
#Build a basic filter expression
Build-LMFilter

This example launches the interactive filter builder wizard.

Terminal window
#Build a filter with field validation for devices
Build-LMFilter -ResourcePath "/device/devices"

This example launches the wizard with field validation and suggestions for the device endpoint.

Terminal window
#Build a filter and return the expression
Build-LMFilter -PassThru

This example builds a filter and returns the expression as a string.

When specified, returns the filter expression as a string instead of displaying it in a panel.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Optional. The API endpoint path (e.g., ‘/device/devices’) to provide field validation and suggestions.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

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.