0

I'm working on a PowerShell script which sets a variable based on a user selection from an array, but I can't find any approach to realize this.

There is a variable named $org which is filled by a cmdlet with an array of entries looking like this:

enter image description here

My goal is to create a user selection menu which prompts to select one entry of that array writing this selection to a variable which can be used in the ongoing script. The number of entries in that array can vary.

I tried something with switch-operator but no success. I'm completely stumped. :-/

Thank you, Chris

this_is_cve
  • 15
  • 1
  • 6
  • 1
    https://stackoverflow.com/q/55718348/45375 provides pointers. If you want to program something yourself, please show what you've tried so far and where, specifically, you're stuck. – mklement0 Nov 28 '22 at 22:23

0 Answers0