Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

WhereOperatorSelectionMode Enum

Definition

Namespace:
System.Management.Automation
Assembly:
System.Management.Automation.dll
Package:
Microsoft.PowerShell.5.1.ReferenceAssemblies v1.0.0
Package:
System.Management.Automation v7.4.15
Package:
System.Management.Automation v7.5.6
Package:
System.Management.Automation v7.6.1

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Controls the matching behaviour of the Where() operator.

public enum class WhereOperatorSelectionMode
public enum WhereOperatorSelectionMode
type WhereOperatorSelectionMode = 
Public Enum WhereOperatorSelectionMode
Inheritance
WhereOperatorSelectionMode

Fields

Name Value Description
Default 0

Return all matches.

First 1

Stop processing after the first match.

Last 2

Return the last matching element.

SkipUntil 3

Skip until the condition is true, then return the rest.

Until 4

Return elements until the condition is true then skip the rest.

Split 5

Return an array of two elements, first index is matched elements, second index is the remaining elements.

Applies to