Build-LMFilter
Syntax
Build-LMFilter [-PassThru] [-ProgressAction <ActionPreference>] [<CommonParameters>]
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.
Examples
Example 1
#Build a basic filter expressionBuild-LMFilterThis example launches the interactive filter builder wizard.
Example 2
#Build a filter and return the expressionBuild-LMFilter -PassThruThis example builds a filter and returns the expression as a string.
Parameters
-PassThru
When specified, returns the filter expression as a string instead of displaying it in a panel.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-ProgressAction
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
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
None. You cannot pipe objects to this command.
Outputs
[String] Returns a PowerShell filter expression when using -PassThru.
Notes
The filter expression is saved to the global $LMFilter variable.