I am using the below code in PoweerShell script:-
$options = @{
"A"="a"
"B"="b"
}
$props = @{
Parameters = @(
@{Name="selectedOption"; Title="Choose an option"; Options=$options; Tooltip="Choose one."}
)
Title = "Option selector"
Description = "Choose the right option."
Width = 300
Height = 300
ShowHints = $true
}
Read-Variable @props
I need to get selected dropdown values. However, it is showing ok or cancel result when I click on ok and cancel button in dialog box. I have tried $props.Parameters.Value
as well it is showing the dropdown values but not the selected value everytime.