Skip to content

Build-LMFilter

Terminal window
Build-LMFilter [-PassThru] [-ProgressAction <ActionPreference>] [<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.

Terminal window
#Build a basic filter expression
Build-LMFilter
This example launches the interactive filter builder wizard.
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: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

None. You cannot pipe objects to this command.

Section titled “None. You cannot pipe objects to this command.”

[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.