Build-LMFilter
Syntax
Section titled “Syntax”__AllParameterSets
Section titled “__AllParameterSets”Build-LMFilter [[-ResourcePath] <string>] [-PassThru] [<CommonParameters>]Description
Section titled “Description”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.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”#Build a basic filter expressionBuild-LMFilterThis example launches the interactive filter builder wizard.
EXAMPLE 2
Section titled “EXAMPLE 2”#Build a filter with field validation for devicesBuild-LMFilter -ResourcePath "/device/devices"This example launches the wizard with field validation and suggestions for the device endpoint.
EXAMPLE 3
Section titled “EXAMPLE 3”#Build a filter and return the expressionBuild-LMFilter -PassThruThis example builds a filter and returns the expression as a string.
Parameters
Section titled “Parameters”-PassThru
Section titled “-PassThru”When specified, returns the filter expression as a string instead of displaying it in a panel.
Type: System.Management.Automation.SwitchParameterDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-ResourcePath
Section titled “-ResourcePath”Optional. The API endpoint path (e.g., ‘/device/devices’) to provide field validation and suggestions.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 0 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “CommonParameters”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.