Build-LMFilter
Syntax
Section titled “Syntax”Build-LMFilter [-PassThru] [-ProgressAction <ActionPreference>] [<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.
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 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: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept 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”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”[String] Returns a PowerShell filter expression when using -PassThru.
Section titled “[String] Returns a PowerShell filter expression when using -PassThru.”The filter expression is saved to the global $LMFilter variable.