Skip to content

Select-Option

SYNOPSIS

Display a selection menu for an array of strings piped to the function.

SYNTAX

Select-Option [-Naam] <String> [[-Waarde] <String>] [[-Vraag] <String>] [<CommonParameters>]

DESCRIPTION

This function displays a selection menu for all members of an array of strings piped to it. The user can make a choice, and the function returns the selected value. The function also allows customization of the prompt question.

EXAMPLES

EXAMPLE 1

$klanten | Select-Option -Vraag "Welke klant had je gewenst?"

Displays a selection menu for the items in the `$klanten` array with the custom question "Welke klant had je gewenst?".

PARAMETERS

-Naam

The name or display name of the item to be displayed in the selection menu.

Type: String
Parameter Sets: (All)
Aliases: Name, Displayname

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Waarde

The value associated with the item. If not provided, it defaults to the value of `Naam`.

Type: String
Parameter Sets: (All)
Aliases: DN, DistinguishedName

Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Vraag

A custom question to display instead of the default "Maak je keuze".

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept 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

OUTPUTS

NOTES